-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verbatim blocks tildes syntax supported? #41
Comments
Not sure. On the one hand, there's an argument for keeping it simple and just having one form. |
I've always thought that the tildes look way better for fencing than the backticks, especially when viewed with lines/paragraphs around them:
The backticks are floating up too high on the top of the block, and too squeezed in on the bottom. Any time I write them I have to go back and check, "wait, did I add a blank line under that block?" The tildes look pleasingly symmetric. Although I usually push for max consistency, this is one case where one syntax looks superior enough to another that I'd support and actively promote the I think that any glyphs used for fencing (block delimiters) should be "vertically balanced", and at least a little wide, for example:
and not
|
Yes, the vertical balance issue was why in our original discussions of fenced code blocks (long before GitHub implemented them), the PHP Markdown designer and I decided on tildes. However, there are a couple things to be said in favor of backticks:
Against backticks, there is a potential ambiguity between inline and block code interpretations in markdown:
However, djot avoids that ambiguity by requiring blank lines around the code block. |
Github md has supported the tildes too, as far back as I can remember.
Yeah, I see that it's consistent in that way. But I think when you have both an inline syntax and a fenced block syntax for a particular style, it makes sense to use a different character for the fences if it doesn't look right as a fence. I think the success of light markup languages is directly proportional to how much people like reading them in plain text. Two very valuable fences still available for djot syntax are |
In principle we could use |
I've never used Do you prefer If you went with Or maybe
Re. metadata block ideas, see #35. In the above example ideas, I don't include a list-table block (#27) because I think @bpj 's idea of using |
I think it's — for better or worse — best to stick with backticks for verbatim blocks since that is what most Markdown implementations use, to avoid confusion. Given that |
Since djot requires blank lines around blocks, and since it's unlikely to use a Anyhow, I'm happy if I can at least keep using @jgm wrote:
I think it's a great idea to remove |
Following the argument of consistency between single and triple backticks, it's worth noting that the syntax for generic blocks could also be made more consistent with that of generic inline spans,
But I'm not sure the consistency would be worth the additional compatibility break from the |
Cross-referencing #59, which proposes the reverse, i.e. keeping |
Whenever I encounter alternative ways to delimit code I always assume that they are there to help you avoid the use-mention problem, something which is especially easy to run into for code content. But I haven’t seen that as a justification of this feature anywhere (it’s not in the design rationale part of the readme). So an alternative to using X amount of backticks. Which inline looks especially bad. (Five backticks and two spaces in order to display one, is it? In StackOverflow MarkDown anyway, which I guess is CommonMark.) I would formulate that as a design rationale:
And design rationale № 11 (last in the list) accomodates such rules:
|
On my layout, the only way to type backtick is Typing a backtick fenced block for me involves pressing |
On French keyboards, backtick is |
The only way to do that for code blocks is to give some options. Because (as the discussion has revealed) backticks are hard to write on some keyboards. It's not my personal experience since I don't use dead keys, but I can't imagine interspersing some diacritic-heavy language (using dead keys) and things like code blocks without some assistance like textual insertion. |
I notice that, in addition to triple-backticks, I can get verbatim blocks with tildes as well:
but it's not mentioned in the syntax reference.
Will djot continue to support the triple-tilde syntax for code blocks?
Incidentally, if triple-tilde delimiters were no longer used for code blocks, maybe they could be used for figures (see #31).
The text was updated successfully, but these errors were encountered: