Code Monkey home page Code Monkey logo

Comments (8)

Jermolene avatar Jermolene commented on July 24, 2024

Hmm I'd forgotten about this, but, yes, it's a bit of a mess, and something needs to be done.

I note that Wiki Creole doesn't support strikethrough, and so can't guide us.

Given that strikethrough is fairly rare in normal written text, I wonder about:

-- for n-dash
--- (3 dashes) for m-dash
----text---- (4 dashes) for strike through

I'm increasingly of the opinion that we need to be ready to make breaking changes to the wikisyntax. I hope to make TW5 at least 100 times more popular than classic TW, and so don't want to saddle the new users with too much archaic crankiness. TW5's plugin mechanism means that it will remain possible for people to customise things back to the classic behaviour if they need to.

from tiddlywiki5.

pmario avatar pmario commented on July 24, 2024

-- for n-dash
--- (3 dashes) for m-dash

Since it is same as in TeX and scientific writes may be familiar with it, I think it would be a choice.

---- (4 dashes) is used to create a <hr>, but it needs to be terminated by \n, so would be possible too.

I'm increasingly of the opinion that we need to be ready to make breaking changes to the wikisyntax.

Yup, there are several syntax issues, that I would want to have improved. Most are even non breaking, but fallback related. (I could post a feature request here?)

Especially measures should be taken, to enable <p> paragraph recognition.

from tiddlywiki5.

Jermolene avatar Jermolene commented on July 24, 2024

It'll probably be a few weeks before I work on the wikitext parser, so it's a good time to discuss changes

from tiddlywiki5.

pmario avatar pmario commented on July 24, 2024

I did post some thoughts at my tiddlyspace [1], because refining it there is easier.

[1] http://pmario.tiddlyspace.com/#TW5SyntaxThoughts

from tiddlywiki5.

Jermolene avatar Jermolene commented on July 24, 2024

Thanks Mario.

The new paragraph handling will use double line breaks to signify paragraph breaks, and single line breaks will be just treated as whitespace. This will mean that macros on consecutive lines will not have line breaks inserted between them. As you note, this will make raw wikitext much more readable.

One other changes planned for the wikifier are to accept HTML tags, which is why it makes sense for the templates to be wikitext; one will just be able to write HTML in there.

In terms of the clash between {{{.js and the code markup for spans, could you very kindly remind me what the problem was with the current $$$.js syntax?

Cheers

jeremy

from tiddlywiki5.

pmario avatar pmario commented on July 24, 2024
$$$.js  + some more params till the end of the line
if (a > b) {
    c = 3; // some litte code snippet.
}
$$$

For me $$$.less is intrusive. /*{{{.less*/ is intrusive too, but it is existing syntax. Copy / pasting the tiddler source into 3rd party software works well.

The new markers can't be used eg: inside a javascript tiddler, because it will cause a syntax error.
//{{{.json is a valid js comment and can indicate which syntax highlighting should be used.
/*{{{.less*/ is a valid css comment
<!--{{{.svg--> html comment.

The new marker can only be used for exactly one behavior inside TW text tiddler. The "extended vanilla" markers could be used in plain text tiddlers and in "evaluated" tiddlers, without breaking there syntax.

from tiddlywiki5.

Jermolene avatar Jermolene commented on July 24, 2024

I think the syntax for typed blocks needs to be quite obtrusive; it's a big conceptual shift to move to a different form of markup. I selected $$ following MathJax and Latex.

In terms of using these markers inside a JavaScript tiddler, don't forget that now JavaScript tiddlers are parsed and pretty printed as syntax coloured JavaScript. Wikitext is currently used for JavaScript comments, and it's OK to use the $$ notation inside there if required.

from tiddlywiki5.

pmario avatar pmario commented on July 24, 2024

I think the syntax for typed blocks needs to be quite obtrusive; it's a big conceptual shift to move to a different form of markup. I selected $$ following MathJax and Latex.

OK. Seeing $$$ in the context of MathJax ($..$, \(..\), \[..\], or $$..$$) and Latex I can live with that. And its also easy to explain now :)

--Quoted from the math-template space [2]--

In MathJax, all commands need to be enclosed in $...$, (...), [...], or $$...$$. This includes environments like \begin{align_}...\end{align_} and macro definitions such as \def\union{\cup}


In terms of using these markers inside a JavaScript tiddler, don't forget that now JavaScript tiddlers are parsed and pretty printed as syntax coloured JavaScript.

Right. But as soon, as the TW5 API has stabilized, I want to have pretty editing for every language used with TW [1][3]. The benefit of the new js parser is, that it can do realtime parsing, to point out syntax errors. I'd love to have this feature.


I still think, that extending the existing block syntax would make sense. I'll add my reasoning in a new post here.

[1] http://codemirror.net/mode/tiddlywiki/index.html
[2] http://math-template.tiddlyspace.com/#[[Latex%20and%20MathJax]]
[3] http://codemirror.tiddlyspace.com/

from tiddlywiki5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.