Problems with embedded code in ddoc

bachmeier no at spam.net
Thu Sep 17 18:38:08 UTC 2020


On Thursday, 17 September 2020 at 18:26:29 UTC, FreeSlave wrote:
> I read this page https://dlang.org/spec/ddoc.html#embedded_code 
> and noticed that backticks (`) and tildes (~) should be 
> supported too when embedding code, but when I use dmd -D on my 
> source it produces html without the block of code, but just 
> text and actually tries to interpret <iostream> as html tag! 
> Moreover if I change backticks to hyphens in the C++ code 
> example, it produces
>
> Error: unmatched --- in DDoc comment
>
> So what's wrong? dmd ddox generator or the ddoc documentation?
>
> Here's the file I ran dmd -D on:
>
> /++
>  + Some C++
>  + ``` cpp
>  + #include <iostream>
>  +
>  + void foo()
>  + {
>  +     std::cout << "foo!";
>  + }
>  + ```
>  +/
> module main;
>
> void main() {}

Are you using the most recent beta, where markdown is supported 
by default?


More information about the Digitalmars-d mailing list