Code Monkey home page Code Monkey logo

Comments (11)

jgm avatar jgm commented on June 19, 2024 2

An advantage of * * * is that it's got quite an old history for this use, going back to typewriter days if I can remember.

from djot.

ad-si avatar ad-si commented on June 19, 2024 1

I just read the specification and this immediately caught my eye. I'm also voting for --- as the one and only option.

from djot.

oxalica avatar oxalica commented on June 19, 2024 1

One advantage of *** over ---, by the way, is that *** doesn't have any other assigned use, while --- could (if it weren't used for thematic breaks) be used to write a paragraph containing just a single em dash.

That's fair. I don't have a strong opinion between *** and ---. I just prefer it to be canonical, unique, and better without spaces in between.

I also want to add that the example code (with spaces) looks too similar to crontab syntax, where * * * * * actually has a meaning: every minutes.

Then they went to sleep.

      * * * *

When they woke up, ...

So at the first glance, this may look like they sleep one/every minute, and especially set a cron job alarm as a joke. 🤔

from djot.

Omikhleia avatar Omikhleia commented on June 19, 2024 1

@uvtc Perhaps I read it wrong, but what does centering and rendering have to do with Djot (syntax)? The renderer (be it HTML or other) is responsible for interpreting and styling it. No?

from djot.

jgm avatar jgm commented on June 19, 2024

The infinite lookahead point is a good one, so I think we need at least some change.

Of course, we could avoid infinite lookahead while retaining more possibilities for thematic breaks by putting an upper bound on the length of the thematic break.

One advantage of *** over ---, by the way, is that *** doesn't have any other assigned use, while --- could (if it weren't used for thematic breaks) be used to write a paragraph containing just a single em dash.

from djot.

Omikhleia avatar Omikhleia commented on June 19, 2024

An advantage of * * * is that it's got quite an old history for this use, going back to typewriter days if I can remember.

As far as old typescripts go, well that could be true for - - - or ------- etc. :D
Even in conjunction with various *-based patterns when the typist needed several types of breaks (in novels, etc.), from asterisms to dinkuses and other pendants... So that might not be a very good reason ;)

from djot.

bpj avatar bpj commented on June 19, 2024

Well various asterisk based things were used in printed books long before typewriters, including three asterisks with space between them, albeit usually a wider space.

from djot.

uvtc avatar uvtc commented on June 19, 2024

Aside, it would be nice if djot users could easily get a centered * * * when wanted. I know in the past (with pandoc) I've done something like <center>\* \* \*</center>, because it gave a nice small thematic break without the full horizontal line.

If djot had a syntax for centered text, I'd use that when I wanted the centered * * *, and then just use its current thematic break syntax for the full HR.

Regardless, to reduce any potential ambiguity, I think it's a good idea to require the interstitial spaces in * * * or - - - for the HR syntax.

from djot.

bpj avatar bpj commented on June 19, 2024

@uvtc Since in djot even thematic breaks can take attributes you could easily use something like ***{.asters} and then have the renderer, a filter or a post-processor replace it with the desired (raw) HTML. You could probably also do it with some wicked CSS.

from djot.

Omikhleia avatar Omikhleia commented on June 19, 2024

@bpj actually the thematic break is a block element, so attributes have to come before (+ blank lines around):

{.asters}
***

Whereas ***{.asters} is the (styled) inline element composed of 3 stars, not a thematic break.

(Same with --- with additionaly it being interpreted as an emdash in inline context)

from djot.

uvtc avatar uvtc commented on June 19, 2024

Thanks, all. Yes, as also pointed out to me in #205 , I see that I could do


{.center}
\* \* \*

and have some css to center that.

from djot.

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.