Adding Markdown to Ddoc

Bastiaan Veelo Bastiaan at Veelo.net
Tue Dec 12 13:50:42 UTC 2017


On Tuesday, 12 December 2017 at 11:48:24 UTC, Chris wrote:
> On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis 
> wrote:
>>
>> And then you have to worry about something like int* screwing 
>> with things, because the compiler decides that you wanted 
>> italics. Honestly, I don't think that something like $(I foo) 
>> is very onerous - it's not all that different from <i>foo</i> 
>> or [i]foo[/i] (which plenty of folks are familiar with), but 
>> it's shorter and less visually noisy - and it doesn't risk 
>> having stuff that isn't supposed to be markdown being treated 
>> as markdown.
>>
>> [...]
>
> Try this one (paste it into http://spec.commonmark.org/dingus/):
>
> # CommonMark
>
> ```
>     int* ptr;
> ```
> `int*` is a pointer to an integer.
>
> int* is a pointer to an integer.

Coming up with a counter example is easy. Try this:

> To dereference a pointer variable, write *i. To define a 
> pointer variable, write int* i.

Inserting backticks obviously solves this and personally I would 
be fine with that requirement, but Markdown is not completely 
harmless. The above line comes out totally as not intended.


More information about the Digitalmars-d mailing list