8 ms·
StrictMark: Markdown, Refactored
- gritzko 6y agoThe author is here, AMA.
- jtbayly 6y ago> no arbitrary nesting What are the restrictions? For example, I care about these (off the top of my head): 1. Can I nest a block quote in another block quote? 2. Can I nest a block quote in an (ordered or unordered) list? (And vice versa?) 3. Can I emphasize some text inside a strong? (and vice versa?)
- gritzko 6y agoThanks for the question. "No arbitrary nesting" applies to inline formatting. Higher precedence formatting can be nested within lower. So, nothing can be nested within a code span, for example, as it is the highest. Just a way to order things. Container blocks are nested arbitrarily, up to 16 levels. Quote > list > quote > code, for example, is OK.
- newlikeice 6y agodid I miss link or is there a parsing script yet?
- gritzko 6y agoThere is a C++ version which should be separated from a code base first... But the parser is Ragel-based, so contact me if you plan to make an implementation in any language Ragel supports.
- cratermoon 6y agoWhat problem were you hoping to solve with this?
- gritzko 6y agoA reliable format for my docs, which is already well supported (and I want a Ragel parser because requirements). In the long run, I am a Decentralized Web guy, so making Markdown a proper language has its own value.
- m___ 6y agoYour theoretical and well contexted overview of the Web, your mininal formatting overhead (no googles and 5000 cubicles), (single person in charge of content and formatting) view is essential not trivial.
- mklcp 6y agoWhy are headers limited to four levels? Do they have to be always padded with spaces? Why are references limited to one symbol? It can just be more mnemonic to have `java_doc` than `j Why only full reference links are allowed? It would be handy to have a shortcut for links without reference, and it's not like we're running out of symbols: `?[]` could be used for links without reference while being consistent with `![]`, which is used for transclusion Why is it impossible to put backticks inside a code span? What is there a `<!-- -->` in an example in the Lists section? I really like the spirit of this markdown alternative
- gritzko 6y agoThanks. It makes all block level formatting aligned to 4 char indents. Hence, paddings. Hence the one letter limitation. The terrible HTML comment hack is straight from the CommonMark spec... it solved a Markdown syntax issue... hope to kill it somehow.
- ufo 6y agoHow fundamental is the requirement that all the "block stuff" be exactly four characters wide? The parts that were the strangest for me are that link references can only contain a single unicode character and that block quotes are ">" plus three spaces, instead of ">" plus one space.
- mixmastamyk 6y agoIt's odd for a second, then seemed fine to me. Think if hexadecimal just kept going…
- mixmastamyk 6y agoI had to increase the line-height to read it, was too cramped at 1.2.
- remram 6y agoCan I put backticks in inline code now? :) What about making some of my code bold?
- jasonpeacock 6y agoAt first glance, there's a lot of words and not many examples. It's hard to quickly see what's different and special about this version of Markdown, other than "it's a formal subset of the other formats". I see some examples for specific elements, but I'd love to see "here's an example demonstrating the problem(s) this addresses", and "here's the fixed version of that example". There could be sub-sections of contrasting examples, like in coding style guides, showing the Old/New (Bad/Good?) styles.
- gritzko 6y agoYep. The [document][1] itself may be a basic example. [1]: http://doc.replicated.cc/%5EWiki/strictmark.sm?@text http://doc.replicated.cc/%5EWiki/strictmark.sm?@text "The source code of the doc"
- jedimastert 6y agoI kinda got that vibe, but the source should have been way easier to find
- e12e 6y agoIt's a good effort, but I'm afraid it isn't a good fit for me, three things stand out: 1) the use of # rather than underline for headings. That why I feel you loose the beauty of the source form - headers disappear visually without a smart editor - if you demand a smart/wysiwyg editor anyway... Might just use a sgml/xml/html subset. 2) one symbol references. This strikes me as overly limiting - why not alphanumeric string - or at the very least any number string? It feels a bit strange to be forced to count 1,2...9,a - and not be able to things like a1, a2, b11. 3) "no way to put backticks inside a code span." So, no (full) examples of restricted markdown in codeblocks? Not to mention the many languages that use backticks? I think you might be happier with reStructuredText than markdown: https://en.m.wikipedia.org/wiki/ReStructuredText https://en.m.wikipedia.org/wiki/ReStructuredText
- gritzko 6y ago3) That is for an inline code span only; can interrupt the span, put an escaped backtick, reopen the span. There is an example in the document. In fenced blocks, anything is accepted. 2) Yes, that mostly implies [1],[2]... pattern. Have to think of other solutions. 1) Well, yes. Aestetics is difficult to quantify. I use empty lines so headers stand out.
- codethief 6y ago> 1) the use of # rather than underline for headings. While in theory I understand the appeal of the "WYSIWYG" syntax of underlining headings, in practice I've always found it less readable than expected. Consider, for instance: I am a paragraph belonging to the previous section but it looks like the heading belongs to me. I am a heading indicating a new section ======================================= I am a paragraph belonging to the heading but the heading is weirdly separated from me. I am another paragraph belonging to the heading. In some editors/IDE, the underline even gets highlighted / boldfaced, thereby exacerbating this effect.
- chipotle_coyote 6y agoI very rarely see this style -- which comes from "Setext", IIRC, which might be patient zero of the "human readable plain text markup styles" -- in the wild anymore, and I suspect it's probably for the reasons you're describing here. I almost never use it myself, except in contexts where the "source file" is just as likely to be read as a rendered HTML version. README files are a good example. > In some editors/IDE, the underline even gets highlighted / boldfaced, thereby exacerbating this effect. I think a lot of editors just don't know about this style of heading, but they do know that a line of three or more dashes is used to create a horizontal rule, so they're trying to highlight that.
- deleted 6y ago[deleted]
- TrevorFSmith 6y agoI don't even agree with all of the design but Thank Goodness for a regular grammar, domain specific syntax transclusion, and only one syntax per feature. Love it.
- splatcollision 6y agoMarkdown was engineered to be flexible _on purpose_ because it was designed for writers and readers, not programmers. Writers are less likely to care about what symbol means "bulleted list item", as long as anything that makes sense for it, just works. It's a mistake to think of Markdown as a programming language, or a "formal grammar". That being said, if it works for you go for it...
- gritzko 6y agoI have my agenda https://news.ycombinator.com/item?id=25961188 https://news.ycombinator.com/item?id=25961188
- legulere 6y agolists are one of markdown's weak points though with numbered lists completely ignoring the numbers
- admax88q 6y agoThats optimized for never having to renumber yoir lists as you edit your document. I would hate to have to change 30 numbers because i want to move an item from last to first.
- hyperpape 6y agoOptimizing for readers definitely excludes lists like: 2. 3. 5. 6. 1.
- setr 6y agoTbf it’d be trivial to have a button/flag to fix it in the source, and a warning to notify the user. It’d might be debatable to do so automatically, but on demand there’s no issue (like words table of content update/warning). But the current definition of “its always sequential, that’s it” means you could do it automatically without changing meaning. Whereas do-as-I-say is stuck with being unsafe, always
- codethief 6y ago> The unordered list markup symbol is a dash -. The other two Markdown options are * and +. But * is ambiguous and + is unpopular and there must be one way only! THANK YOU for getting rid of the asterisk. As a former org-mode user it has always bugged me when people use the asterisk for lists, not headings. :)
- chipotle_coyote 6y agoI appreciate your viewpoint, but as someone who has used * out of habit for plain text lists long before Markdown was a thing, this is kind of a big ask. :)
- chipotle_coyote 6y agoFrom the spec: > No double symbols, i.e. strong not *strong*. I understand the rationale. But, this is immediately no longer Markdown. "It's 'Markdown, Refactored!'" If "refactored" means "incompatible," sure? I guess? But still: incompatible. "So what?" Good question, imaginary interlocutor. Here's so what: one of Markdown's defining features, love or it hate it, is that it deliberately doesn't make you choose between emphasizing with * characters or emphasizing with _ characters, other than being consistent with the start and end. Use a single * or _ character, get emphasis/italics; use double, get strong/bold; you don't get underlines because you don't use those in typography. The same is true for lists: only "-" is acceptable, not "+" or "". Fine, but there are a lot of Markdown documents that are out there that use "" as the list character, and I am sure there is at least one weirdo inexplicably using "+". So StrictMark breaks every Markdown document that uses boldface, and probably about half the Markdown documents that use italics. (I don't know about other Markdown users, but over the years I have not been consistent with how I markup italics, for a variety of reasons.) And, it probably breaks about half the unordered lists in the wild, too. I understand that this is being done for well-intentioned and noble reasons, but: it ain't Markdown. It's a new, incompatible plaintext markup system. This creates a bit of an uncomfortable point: if I'm going to have to redo all my documents (or just do things The New Way going forward), then why not switch to AsciiDoc or Textile?
- gritzko 6y agoStrictMark breaks nothing. The arrow is one way: Markdown code mostly supports StrictMark. One may say that "mostly" is bad, but an arbitrary Markdown implementation mostly supports an arbitrary Markdown document, so nothing new here. For ~full MarkDown support there is CommonMark code.
- jsilence 6y agoReally wish the org format would gain more traction.
- reificator 6y agoReference links as opposed to inline links is a huge plus, but like most others here I'm puzzled at the single-char restriction. I tend to restructure documents often, writing things as they come into my head and moving pieces around to better convey my message. With named references, I can simply alphabetize them at the bottom and forget about them while I move sections around. With single-char identifiers though, I'd feel an obligation to keep things in reference order, so one more thing to think about while I'm working. On another note, I'm interested in this idea of reusing image links to preview CSVs and other formats. (graphviz comes to mind) Do you have any examples of this being used in a document and the tooling to stitch it together?
- mst 6y agoName each link using an arbitrary emoji? (I'm not even sure I'm joking)
- ziml77 6y agoI like it. I mean I'm not sure how much I agree with some of the specific design decisions, but it's such an improvement to lose the ambiguity.
- svnpenn 6y agoThis is pointless. We can see the input and output: http://doc.replicated.cc/%5EWiki/strictmark.sm?@text http://doc.replicated.cc/%5EWiki/strictmark.sm?@text http://doc.replicated.cc/%5EWiki/strictmark.sm http://doc.replicated.cc/%5EWiki/strictmark.sm So obviously an implementation was made, but whoever wrote the article didnt bother to share the implementation.
- deleted 6y ago[deleted]
- geoelectric 6y agoThis won't work for my docs at all. I use all three unordered bullets to differentiate things in plaintext. The opinionation that removes synonyms will kill any chances of this working with legacy IMO. Any significant doc base will hit myriad issues that come down to "I didn't like that form of it." I was initially OK with the idea of a parseable subset, which would be useful, but this goes too far with a "one way only" attitude. No thanks. That said, someone should do what the project claims to do, without gutting the language. A formalized subset of CommonMark that only skips formally indescribable specs but otherwise preserves everything else would be useful in some situations. It might even become the defacto CommonMark spec if it's easier to implement.
- aidenn0 6y ago> Yes, HTML is a widely supported standard, but it is hopelessly elephantine. Let's think, who can afford to develop/support a proper HTML engine? That is roughly one-and-a-half companies in the world. Hence the interest in a minimalistic hypertext markup language. There are dozens of proper HTML engines. Implementing a proper DOM and CSS is the hard part, which is why we have few full-featured browsers.
- kderbyma 6y agoI appreciate all opinions as equally useless and this is just an opinionated less-usefull markdown.....I don't see the point at all.... markdown is meant for rendering ..... it should be as flexible as possible to write content....not restricted. I get the pain points of the devs ... never was the point of markdown. I feel like this engineers a new problem.... by removing an old solution