Project

General



Profile

« Previous | Next » 

Revision 1479

Adds multi-levels blockquotes support by using > at the beginning of lines.
Textile is preserved inside quoted text.

View differences:

trunk/lib/redcloth.rb
299 299
        hard_break text 
300 300
        unless @lite_mode
301 301
            refs text
302
            # need to do this before text is split by #blocks
303
            block_textile_quotes text
302 304
            blocks text
303 305
        end
304 306
        inline text
......
576 578
            lines.join( "\n" )
577 579
        end
578 580
    end
581
    
582
    QUOTES_RE = /(^>+([^\n]*?)\n?)+/m
583
    QUOTES_CONTENT_RE = /^([> ]+)(.*)$/m
584
    
585
    def block_textile_quotes( text )
586
      text.gsub!( QUOTES_RE ) do |match|
587
        lines = match.split( /\n/ )
588
        quotes = ''
589
        indent = 0
590
        lines.each do |line|
591
          line =~ QUOTES_CONTENT_RE 
592
          bq,content = $1, $2
593
          l = bq.count('>')
594
          if l != indent
595
            quotes << ("\n\n" + (l>indent ? '<blockquote>' * (l-indent) : '</blockquote>' * (indent-l)) + "\n\n")
596
            indent = l
597
          end
598
          quotes << (content + "\n")
599
        end
600
        quotes << ("\n" + '</blockquote>' * indent + "\n\n")
601
        quotes
602
      end
603
    end
579 604

  
580 605
    CODE_RE = /(\W)
581 606
        @
trunk/lib/redmine/wiki_formatting.rb
45 45
      # Patch for RedCloth.  Fixed in RedCloth r128 but _why hasn't released it yet.
46 46
      # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
47 47
      def hard_break( text ) 
48
        text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />\n" ) if hard_breaks 
48
        text.gsub!( /(.)\n(?!\n|\Z|>| *(>? *[#*=]+(\s|$)|[{|]))/, "\\1<br />\n" ) if hard_breaks 
49 49
      end
50 50
      
51 51
      # Patch to add code highlighting support to RedCloth
trunk/public/javascripts/jstoolbar/jstoolbar.js
498 498
	}
499 499
}
500 500

  
501
// spacer
502
jsToolBar.prototype.elements.space3 = {type: 'space'}
503

  
504
// bq
505
jsToolBar.prototype.elements.bq = {
506
	type: 'button',
507
	title: 'Quote',
508
	fn: {
509
		wiki: function() {
510
			this.encloseLineSelection('','',function(str) {
511
				str = str.replace(/\r/g,'');
512
				return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
513
			});
514
		}
515
	}
516
}
517

  
518
// unbq
519
jsToolBar.prototype.elements.unbq = {
520
	type: 'button',
521
	title: 'Unquote',
522
	fn: {
523
		wiki: function() {
524
			this.encloseLineSelection('','',function(str) {
525
				str = str.replace(/\r/g,'');
526
				return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
527
			});
528
		}
529
	}
530
}
531

  
501 532
// pre
502 533
jsToolBar.prototype.elements.pre = {
503 534
	type: 'button',
......
508 539
}
509 540

  
510 541
// spacer
511
jsToolBar.prototype.elements.space3 = {type: 'space'}
542
jsToolBar.prototype.elements.space4 = {type: 'space'}
512 543

  
513 544
// wiki page
514 545
jsToolBar.prototype.elements.link = {
trunk/public/javascripts/jstoolbar/lang/jstoolbar-bg.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-cs.js
9 9
jsToolBar.strings['Heading 3'] = 'Záhlaví 3';
10 10
jsToolBar.strings['Unordered list'] = 'Seznam';
11 11
jsToolBar.strings['Ordered list'] = 'Uspořádaný seznam';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Předformátovaný text';
13 15
jsToolBar.strings['Wiki link'] = 'Vložit odkaz na Wiki stránku';
14 16
jsToolBar.strings['Image'] = 'Vložit obrázek';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-da.js
9 9
jsToolBar.strings['Heading 3'] = 'Overskrift 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unummereret list';
11 11
jsToolBar.strings['Ordered list'] = 'Nummereret list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatteret tekst';
13 15
jsToolBar.strings['Wiki link'] = 'Link til en Wiki side';
14 16
jsToolBar.strings['Image'] = 'Billede';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-de.js
9 9
jsToolBar.strings['Heading 3'] = 'Überschrift 3. Ordnung';
10 10
jsToolBar.strings['Unordered list'] = 'Aufzählungsliste';
11 11
jsToolBar.strings['Ordered list'] = 'Nummerierte Liste';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Präformatierter Text';
13 15
jsToolBar.strings['Wiki link'] = 'Verweis (Link) zu einer Wiki-Seite';
14 16
jsToolBar.strings['Image'] = 'Grafik';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-en.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-es.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-fi.js
9 9
jsToolBar.strings['Heading 3'] = 'Otsikko 3';
10 10
jsToolBar.strings['Unordered list'] = 'Järjestämätön lista';
11 11
jsToolBar.strings['Ordered list'] = 'Järjestetty lista';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Ennaltamuotoiltu teksti';
13 15
jsToolBar.strings['Wiki link'] = 'Linkki Wiki sivulle';
14 16
jsToolBar.strings['Image'] = 'Kuva';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-fr.js
9 9
jsToolBar.strings['Heading 3'] = 'Titre niveau 3';
10 10
jsToolBar.strings['Unordered list'] = 'Liste à puces';
11 11
jsToolBar.strings['Ordered list'] = 'Liste numérotée';
12
jsToolBar.strings['Quote'] = 'Citer';
13
jsToolBar.strings['Unquote'] = 'Supprimer citation';
12 14
jsToolBar.strings['Preformatted text'] = 'Texte préformaté';
13 15
jsToolBar.strings['Wiki link'] = 'Lien vers une page Wiki';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-he.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-hu.js
9 9
jsToolBar.strings['Heading 3'] = 'Fejléc 3';
10 10
jsToolBar.strings['Unordered list'] = 'Felsorolás';
11 11
jsToolBar.strings['Ordered list'] = 'Számozott lista';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Előreformázott szöveg';
13 15
jsToolBar.strings['Wiki link'] = 'Link egy Wiki oldalra';
14 16
jsToolBar.strings['Image'] = 'Kép';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-it.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-ja.js
9 9
jsToolBar.strings['Heading 3'] = '見出し 3';
10 10
jsToolBar.strings['Unordered list'] = '順不同リスト';
11 11
jsToolBar.strings['Ordered list'] = '番号つきリスト';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = '整形済みテキスト';
13 15
jsToolBar.strings['Wiki link'] = 'Wiki ページへのリンク';
14 16
jsToolBar.strings['Image'] = '画像';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-ko.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-lt.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Nenumeruotas sąrašas';
11 11
jsToolBar.strings['Ordered list'] = 'Numeruotas sąrašas';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatuotas tekstas';
13 15
jsToolBar.strings['Wiki link'] = 'Nuoroda į Wiki puslapį';
14 16
jsToolBar.strings['Image'] = 'Paveikslas';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-nl.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-no.js
9 9
jsToolBar.strings['Heading 3'] = 'Overskrift 3';
10 10
jsToolBar.strings['Unordered list'] = 'Punktliste';
11 11
jsToolBar.strings['Ordered list'] = 'Nummerert liste';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatert tekst';
13 15
jsToolBar.strings['Wiki link'] = 'Lenke til Wiki-side';
14 16
jsToolBar.strings['Image'] = 'Bilde';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-pl.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-pt-br.js
11 11
jsToolBar.strings['Heading 3'] = 'Cabeçalho 3';
12 12
jsToolBar.strings['Unordered list'] = 'Lista não ordenada';
13 13
jsToolBar.strings['Ordered list'] = 'Lista ordenada';
14
jsToolBar.strings['Quote'] = 'Quote';
15
jsToolBar.strings['Unquote'] = 'Remove Quote';
14 16
jsToolBar.strings['Preformatted text'] = 'Texto pré-formatado';
15 17
jsToolBar.strings['Wiki link'] = 'Link para uma página Wiki';
16 18
jsToolBar.strings['Image'] = 'Imagem';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-pt.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-ro.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-ru.js
9 9
jsToolBar.strings['Heading 3'] = 'Заголовок 3';
10 10
jsToolBar.strings['Unordered list'] = 'Маркированный список';
11 11
jsToolBar.strings['Ordered list'] = 'Нумерованный список';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Заранее форматированный текст';
13 15
jsToolBar.strings['Wiki link'] = 'Ссылка на страницу в Wiki';
14 16
jsToolBar.strings['Image'] = 'Вставка изображения';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-sr.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-sv.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-th.js
9 9
jsToolBar.strings['Heading 3'] = 'หัวข้อ 3';
10 10
jsToolBar.strings['Unordered list'] = 'รายการ';
11 11
jsToolBar.strings['Ordered list'] = 'ลำดับเลข';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'รูปแบบข้อความคงที่';
13 15
jsToolBar.strings['Wiki link'] = 'เชื่อมโยงไปหน้า Wiki อื่น';
14 16
jsToolBar.strings['Image'] = 'รูปภาพ';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-uk.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js
9 9
jsToolBar.strings['Heading 3'] = '標題 3';
10 10
jsToolBar.strings['Unordered list'] = '項目清單';
11 11
jsToolBar.strings['Ordered list'] = '編號清單';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = '格式化文字';
13 15
jsToolBar.strings['Wiki link'] = '連結至 Wiki 頁面';
14 16
jsToolBar.strings['Image'] = '圖片';
trunk/public/javascripts/jstoolbar/lang/jstoolbar-zh.js
9 9
jsToolBar.strings['Heading 3'] = 'Heading 3';
10 10
jsToolBar.strings['Unordered list'] = 'Unordered list';
11 11
jsToolBar.strings['Ordered list'] = 'Ordered list';
12
jsToolBar.strings['Quote'] = 'Quote';
13
jsToolBar.strings['Unquote'] = 'Remove Quote';
12 14
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
13 15
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
14 16
jsToolBar.strings['Image'] = 'Image';
trunk/public/stylesheets/application.css
153 153
fieldset {border: 1px solid #e4e4e4; margin:0;}
154 154
legend {color: #484848;}
155 155
hr { width: 100%; height: 1px; background: #ccc; border: 0;}
156
blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
157
blockquote blockquote { margin-left: 0;}
156 158
textarea.wiki-edit { width: 99%; }
157 159
li p {margin-top: 0;}
158 160
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
trunk/public/stylesheets/jstoolbar.css
84 84
.jstb_ol {
85 85
	background-image: url(../images/jstoolbar/bt_ol.png);
86 86
}
87
.jstb_bq {
88
	background-image: url(../images/jstoolbar/bt_bq.png);
89
}
90
.jstb_unbq {
91
	background-image: url(../images/jstoolbar/bt_bq_remove.png);
92
}
87 93
.jstb_pre {
88 94
	background-image: url(../images/jstoolbar/bt_pre.png);
89 95
}
trunk/test/unit/helpers/application_helper_test.rb
178 178
    assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---')
179 179
  end
180 180
  
181
  def test_blockquote
182
    # orig raw text
183
    raw = <<-RAW
184
John said:
185
> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
186
> Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
187
> * Donec odio lorem,
188
> * sagittis ac,
189
> * malesuada in,
190
> * adipiscing eu, dolor.
191
>
192
> >Nulla varius pulvinar diam. Proin id arcu id lorem scelerisque condimentum. Proin vehicula turpis vitae lacus.
193
> Proin a tellus. Nam vel neque.
194

  
195
He's right.
196
RAW
197
    
198
    # expected html
199
    expected = <<-EXPECTED
200
<p>John said:</p>
201
<blockquote>
202
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
203
Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
204
<ul>
205
  <li>Donec odio lorem,</li>
206
  <li>sagittis ac,</li>
207
  <li>malesuada in,</li>
208
  <li>adipiscing eu, dolor.</li>
209
</ul>
210
<blockquote>
211
<p>Nulla varius pulvinar diam. Proin id arcu id lorem scelerisque condimentum. Proin vehicula turpis vitae lacus.</p>
212
</blockquote>
213
<p>Proin a tellus. Nam vel neque.</p>
214
</blockquote>
215
<p>He's right.</p>
216
EXPECTED
217
    
218
    assert_equal expected.gsub(%r{\s+}, ''), textilizable(raw).gsub(%r{\s+}, '')
219
  end
220
  
181 221
  def test_macro_hello_world
182 222
    text = "{{hello_world}}"
183 223
    assert textilizable(text).match(/Hello world!/)

Also available in: Unified diff