mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
vdoc: minor cleanup (#21225)
This commit is contained in:
parent
0fd67b225c
commit
4e8d00d368
1 changed files with 2 additions and 6 deletions
|
@ -17,7 +17,7 @@ const link_svg = '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0
|
|||
|
||||
const single_quote = "'"
|
||||
const double_quote = '"'
|
||||
const no_quotes_replacement = [single_quote, '', double_quote, '']
|
||||
const quote_escape_seq = [single_quote, '', double_quote, '']
|
||||
|
||||
enum HighlightTokenTyp {
|
||||
unone
|
||||
|
@ -542,7 +542,7 @@ fn doc_node_html(dn doc.DocNode, link string, head bool, include_examples bool,
|
|||
dnw.write_string('</div>\n')
|
||||
}
|
||||
if deprecated_tags.len > 0 {
|
||||
attributes := deprecated_tags.map('<div class="attribute attribute-deprecated">${no_quotes(it)}</div>\n').join('')
|
||||
attributes := deprecated_tags.map('<div class="attribute attribute-deprecated">${it.replace_each(quote_escape_seq)}</div>\n').join('')
|
||||
dnw.writeln('<div class="attributes">${attributes}</div>\n')
|
||||
}
|
||||
if tags.len > 0 {
|
||||
|
@ -598,10 +598,6 @@ fn write_toc(dn doc.DocNode, mut toc strings.Builder) {
|
|||
toc.writeln('</li>')
|
||||
}
|
||||
|
||||
fn no_quotes(s string) string {
|
||||
return s.replace_each(no_quotes_replacement)
|
||||
}
|
||||
|
||||
struct MdHtmlCodeHighlighter {
|
||||
mut:
|
||||
language string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue