Imports Mediacloth's revision r140
Allows variables inside of markup attribute values
| 53 | # Lexer table used inside spans of markup, wherein spans of newlines are not | # Lexer table used inside spans of markup, wherein spans of newlines are not | 53 |
|---|---|---|---|
| 54 | # automatically treated as paragraphs. | # automatically treated as paragraphs. | 54 |
| 55 | @markup_lexer_table = @default_lexer_table.dup | @markup_lexer_table = @default_lexer_table.dup | 55 |
@markup_lexer_table["{"] = method(:match_left_curly) | 56 | ||
| 56 | @markup_lexer_table["\n"] = nil | @markup_lexer_table["\n"] = nil | 57 |
| 57 | @markup_lexer_table["\r"] = nil | @markup_lexer_table["\r"] = nil | 58 |
| 58 | 59 |
| 378 | [:TEXT, "iii"], [:VARIABLE_END, "}}"], [:TEXT, "xxx"], [:VARIABLE_END, "}}"], | [:TEXT, "iii"], [:VARIABLE_END, "}}"], [:TEXT, "xxx"], [:VARIABLE_END, "}}"], | 378 |
|---|---|---|---|
| 379 | [:PARA_END, ""], [false, false]], | [:PARA_END, ""], [false, false]], | 379 |
| 380 | lex("{{xxx{{iii}}xxx}}")) | lex("{{xxx{{iii}}xxx}}")) | 380 |
assert_equal([[:PARA_START, ""], [:TAG_START, "foo"], [:ATTR_NAME, "bar"], [:ATTR_VALUE, "{{ref}}"], [:TAG_END, ""], | 381 | ||
[:PARA_END, ""], [false, false]], | 382 | ||
lex("<foo bar='{{ref}}'>")) | 383 | ||
| 381 | end | end | 384 |
| 382 | 385 | ||
| 383 | def test_xhtml_markup | def test_xhtml_markup | 386 |