X-Git-Url: http://nitlanguage.org diff --git a/lib/markdown/markdown.nit b/lib/markdown/markdown.nit index 99dc87f..10dbcc6 100644 --- a/lib/markdown/markdown.nit +++ b/lib/markdown/markdown.nit @@ -31,7 +31,7 @@ import template class MarkdownProcessor # `MarkdownEmitter` used for ouput. - var emitter: MarkdownEmitter is noinit + var emitter: MarkdownEmitter is noinit, protected writable # Work in extended mode (default). # @@ -118,7 +118,7 @@ class MarkdownProcessor init do self.emitter = new MarkdownEmitter(self) # Process the mardown `input` string and return the processed output. - fun process(input: String): Streamable do + fun process(input: String): Writable do # init processor link_refs.clear last_link_ref = null @@ -537,7 +537,7 @@ class MarkdownEmitter end # Append `e` to current buffer. - fun add(e: Streamable) do + fun add(e: Writable) do if e isa Text then current_buffer.append e else @@ -2412,7 +2412,6 @@ redef class Text private fun meta_from_fence: nullable Text do for i in [0..chars.length[ do var c = chars[i] - print c if c != ' ' and c != '`' and c != '~' then return substring_from(i).trim end @@ -2443,7 +2442,7 @@ redef class String # var md = "**Hello World!**" # var html = md.md_to_html # assert html == "

Hello World!

\n" - fun md_to_html: Streamable do + fun md_to_html: Writable do var processor = new MarkdownProcessor return processor.process(self) end