4 ms·
> If I were not that lazy, i would come up with something opposite to CommonMark, some MarkDownDown, that does away with alternative ways to format things, most
by xigoi 7mo ago
> If I were not that lazy, i would come up with something opposite to CommonMark, some MarkDownDown, that does away with alternative ways to format things, most escaping, and most advanced syntax.
https://djot.net/ https://djot.net/
- nine_k 7mo agoIt makes quite a few right calls, but still tries to not be a strict subset of Markdown, requiring e.g. a different editing mode.
- xigoi 7mo agoBeing a strict subset of Markdown would make it itpossible to achieve simplicity. From the rationale: > Rules for emphasis should be simpler. The fact that doubled characters are used for strong emphasis in commonmark leads to many potential ambiguities, which are resolved by a daunting list of 17 rules. It is hard to form a good mental model of these rules. Most of the time they interpret things the way a human would most naturally interpret them---but not always.
- nine_k 7mo agoIndeed. I'd go with dead simple rules. The below assumes whitespace or punctuation on either side: *bold* _italic_ *_bold italic_* _*also bold italic*_ Any other combination does not parse as formatting, and is considered literal text. Yes, this prevents marginally useful cases like putting an italic fragment in the middle of the word. I'd be fine with that.
- xigoi 7mo agoIf I’m understanding correctly, your rules are based on word boundaries? How do you define a word boundary?
- nine_k 7mo agoWord boundaries are a complex thing, especially in languages like Chinese or Japanese. Whitespace and punctuation are much less complicated, even if we take the full Unicode case. So the boundary where formatting is considered is between (whitespace | punctuation) and anything else.
- xigoi 7mo agoSo now you have to distribute a character class table in every implementation of your language, which is precisely what the author of Djot wanted to avoid.
- NetMageSCW 7mo agoSo y = x * 7 + b * c will be bolded in the middle?
- johannesrexx 7mo agoNo