Problems with embedded code in ddoc

FreeSlave freeslave93 at gmail.com
Thu Sep 17 18:26:29 UTC 2020


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() {}



More information about the Digitalmars-d mailing list