hikidoc:79
From: dan@r...
Date: Wed, 18 Jul 2007 16:45:44 +0900
Subject: [hikidoc:79] 整形済みテキストがescapeされないようです
だんです。 行の先頭をスペースまたはタブではじめたときの整形済みテキストですが、 このときescape_htmlが呼ばれないようです。 Index: test/test_hikidoc.rb =================================================================== --- test/test_hikidoc.rb (revision 50) +++ test/test_hikidoc.rb (working copy) @@ -100,12 +100,14 @@ assert_equal(\"<pre>\\\\:</pre>\\n\", HikiDoc.new(\' \\:\').to_html) assert_equal(\"<pre>foo</pre>\\n\", HikiDoc.new(\"\\tfoo\").to_html) assert_equal(\"<pre>foo\\nbar</pre>\\n\", HikiDoc.new(\" foo\\n bar\").to_html) + assert_equal(\"<pre><foo></pre>\\n\", HikiDoc.new(\" <foo>\").to_html) end def test_multi_pre assert_equal(\"<pre>foo\\n</pre>\\n\", HikiDoc.new(\"<<<\\nfoo\\n>>>\").to_html) assert_equal(\"<pre>foo\\n bar\\n</pre>\\n\", HikiDoc.new(\"<<<\\nfoo\\n bar\\n>>>\").to_html) assert_equal(\"<pre>foo\\n</pre>\\n<pre>bar\\n</pre>\\n\", HikiDoc.new(\"<<<\\nfoo\\n>>>\\n<<<\\nbar\\n>>>\").to_html) + assert_equal(\"<pre><foo>\\n</pre>\\n\", HikiDoc.new(\"<<<\\n<foo>\\n>>>\").to_html) end def test_comment Index: lib/hikidoc.rb =================================================================== --- lib/hikidoc.rb (revision 50) +++ lib/hikidoc.rb (working copy) @@ -307,7 +307,8 @@ def compile_indented_pre(f) lines = f.span(INDENTED_PRE_RE)\\ - .map {|line| rstrip(line.sub(INDENTED_PRE_RE, \"\")) } + .map {|line| rstrip(line.sub(INDENTED_PRE_RE, \"\")) }\\ + .map {|line| @output.text(line) } @output.preformatted restore_plugin_block(lines.join(\"\\n\")) end -- ML: hikidoc@m... 使い方: http://QuickML.com/
-> 79 2007-07-18 09:45 [dan@r... ] 整形済みテキストがescapeされないようです 82 2007-10-03 10:58 ┗[kazuhiko@f... ]