diff --git a/CHANGELOG b/CHANGELOG index dab6b28c..d4e7db4b 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ Added layout=no option to the export_html action (it exports page contents processed by the markup engine, but without the default layout - so that they can be wrapper in some other layout) + tag can span several lines (before it was applied when both opening and closing + tags were on the same line only) * 0.10.1: Upgraded Rails to 0.12.0 diff --git a/app/models/chunks/nowiki.rb b/app/models/chunks/nowiki.rb index ded3c537..ef99ec0b 100644 --- a/app/models/chunks/nowiki.rb +++ b/app/models/chunks/nowiki.rb @@ -15,7 +15,7 @@ require 'chunks/chunk' # Created: 8th June 2004 class NoWiki < Chunk::Abstract - NOWIKI_PATTERN = Regexp.new('(.*?)') + NOWIKI_PATTERN = Regexp.new('(.*?)', Regexp::MULTILINE) def self.pattern() NOWIKI_PATTERN end attr_reader :plain_text diff --git a/test/unit/revision_test.rb b/test/unit/revision_test.rb index 44252a87..2da78fa7 100755 --- a/test/unit/revision_test.rb +++ b/test/unit/revision_test.rb @@ -189,13 +189,21 @@ class RevisionTest < Test::Unit::TestCase 'This is an inline image link.') end - def test_content_with_nowiki_text + def test_nowiki_tag assert_markup_parsed_as( '

Do not mark up [[this text]] or http://www.thislink.com.

', 'Do not mark up [[this text]] ' + 'or http://www.thislink.com.') end + def test_multiline_nowiki_tag + assert_markup_parsed_as( + "

Do not mark \n up [[this text]] \nand http://this.url.com but markup " + + 'this?

', + "Do not mark \n up [[this text]] \n" + + "and http://this.url.com but markup [[this]]") + end + def test_content_with_bracketted_wiki_word @web.brackets_only = true assert_markup_parsed_as(