Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far as custom shortforms for fully tagged angle-bracket markup is concerned, people are reinventing SGML which can handle markdown and other custom syntaxes since 1986.


I've been meaning to see how close I can come to Markdown syntax using SGML's SHORTREF and perhaps architectural forms.


Markdown inline syntax is straightforward to capture using SGML SHORTREF. What's more difficult (impossible) are things such as reference links where a markdown processor is supposed to pull text (the title of a link) from wherever it's defined before or after its usage.

Haven't heard about archforms in a while ;) but it's not a technique for custom syntax, and since markdown is specified as a Wiki syntax with canonical mapping to HTML, there's no need for the kind of simplistic element and token renaming possible with archforms.


I've use archforms in my custom markup before: https://r6.ca/HtmlAsSgml.html

For example added an <nbsp> attribute to turn all spaces into non-breaking spaces, and used archforms to remove the attribute afterwards.

But yeah, maybe for Makrdown you don't need archforms. On the other hand, perhaps there is some super clever way to use archforms to get your reference links working.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: