Closed SebastianHambura closed 4 weeks ago
Looks like this is a bug when converting markdown to html. Exported Markdown file works fine.
It's a pain but you need to insert empty lines:
//!
//! Vitis code snippet :
//!
//! ``` C
//! int* versions = 0x0080000000 ;
//!
//! xil_printf("FLAVOUR: %08x\n\r", versions[10]) ;
//!
//! xil_printf("GLOBAL_DATE: %08x\n\r", versions[9]) ;
//!
//! xil_printf("GLOBAL_TIME: %08x\n\r", versions[8]) ;
//! ```
//!
//! Attempting to write to a register, or to read from a non-existant one crashes the software.
//! (and maybe even stalls the whole CPU, need to be tested)
//!
I think that there is no way to do this. If we render the break line in the comments as a break line in the HTML this is really ugly, in this case it's not possible to split the big lines.
Other way it's only support break line in comments == break line in HTML for code snippets.
i did a workaround in 3fef9842126125b00437d97e6e03079662036ff9
Look a good starting point, but I think that it doesn't work for all the cases. I see the problems:
--
(VHDL) or //
(Verilog/SV).Myabe it's better to iterate all the descriptions after the parsing and to do, before to convert to MarkDown:
code_fix = code.replace(/```[^]*```/g, function(match){return match.replace(/\n/g, ' \n');});
What do you think?
Your are right, i totally forgot about the different comment symbol for verilog/sv. I will revisit this in a new PR.
Describe the bug In the documentation description, markdown multiline code blocks are displayed on a single line.
To Reproduce
Please complete the following information:
Screenshots We get:
I expected (taken from https://markdownlivepreview.com/):
Additional Context As far as I know, for Markdown one quote ' -> code displayed on a single line and 3 quotes ''' -> code should be displayed on multiple lines