1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vdoc: fix markdown content indentation

This commit is contained in:
Delyan Angelov 2021-01-02 23:17:54 +02:00
parent dee3bbffe9
commit 90839a1b76
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -420,10 +420,8 @@ fn doc_node_html(dd doc.DocNode, link string, head bool, tb &table.Table) string
if !head && dd.content.len > 0 {
dnw.writeln('<pre class="signature"><code>$hlighted_code</code></pre>')
}
for line_content in md_content.split('\n') {
dnw.write('\n${tabs[2]}$line_content')
}
dnw.writeln('\n${tabs[1]}</section>')
// do not mess with md_content further, its formatting is important, just output it 1:1 !
dnw.writeln('$md_content\n</section>')
dnw_str := dnw.str()
defer {
dnw.free()