Adding Markdown to Ddoc
    Adam D. Ruppe 
    destructionator at gmail.com
       
    Sat Dec  9 21:25:39 UTC 2017
    
    
  
On Saturday, 9 December 2017 at 21:05:04 UTC, David Gileadi wrote:
> For instance, as I've been working on adding Markdown features 
> I was surprised to discover that DDoc's current support for 
> backtick-delimited code only works within a single line. Most 
> implementations I've seen allow it to span hard-wrapped lines, 
> as long as it's within a single paragraph.
I kinda object to calling the ddoc `` thing markdown, since that 
wasn't the intention. When I added it, I had exactly one goal: be 
able to write `<xml samples>` in ddoc without it breaking the 
html output. At the same time, I didn't want it to accidentally 
trigger if someone pasted a linker error in their doc:
undefined reference to `foo'
undefined reference to `bar'
So it was limited to a single line and required a matching ` to 
trigger the new code. Then, btw, it does NOT just wrap it in a 
$(BACKTICK) macro. It first *escapes the string*, for example 
turning < into <, etc, THEN wraps it in the macro.
Though, the reason it uses ` as the delimiter is because markdown 
does it so it looks familiar... but it wasn't actually based on a 
desire to be markdown.
Similarly, my adrdox thing has some markdown-ish features, but it 
is explicitly NOT markdown, giving me the freedom to avoid brain 
damage. (I am not a fan of markdown, it is such a mess and hard 
to write.)
    
    
More information about the Digitalmars-d
mailing list