X-Git-Url: http://nitlanguage.org diff --git a/src/doc/doc_down.nit b/src/doc/doc_down.nit index 5284dc1..6482032 100644 --- a/src/doc/doc_down.nit +++ b/src/doc/doc_down.nit @@ -111,7 +111,7 @@ private class NitdocDecorator return end # Try to parse code - var code = code_from_block(block) + var code = block.raw_content var ast = toolcontext.parse_something(code) if ast isa AError then v.add "
"
@@ -150,25 +150,6 @@ private class NitdocDecorator
for i in [from..to[ do out.add buffer[i]
return out.write_to_string
end
-
- fun code_from_block(block: BlockCode): String do
- var infence = block isa BlockFence
- var text = new FlatBuffer
- var line = block.block.first_line
- while line != null do
- if not line.is_empty then
- var str = line.value
- if not infence and str.has_prefix(" ") then
- text.append str.substring(4, str.length - line.trailing)
- else
- text.append str
- end
- end
- text.append "\n"
- line = line.next
- end
- return text.write_to_string
- end
end
# Decorator for span elements.