Skip to content

Commit

Permalink
add php tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nixon committed Dec 20, 2013
1 parent bb70843 commit 1d6cac9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sparkup-unittest.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ class SparkupTest:
'input': 'p [attrib=text.com]', 'input': 'p [attrib=text.com]',
'output': '<p attrib="text.com">$1</p>$0' 'output': '<p attrib="text.com">$1</p>$0'
}, },
'PHP tag test': {
'input': 'php',
'output': '<?php\n $1\n?>$0',
},
'Nested curly braces test': { 'Nested curly braces test': {
'input': 'p{{{ title }}}', 'input': 'p{{{ title }}}',
'output': '<p>{{ title }}</p>$0' 'output': '<p>{{ title }}</p>$0'
Expand Down
6 changes: 6 additions & 0 deletions sparkup.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class HtmlDialect(Dialect):
'cc:noie': { 'cc:noie': {
'opening_tag': '<!--[if !IE]><!-->', 'opening_tag': '<!--[if !IE]><!-->',
'closing_tag': '<!--<![endif]-->'}, 'closing_tag': '<!--<![endif]-->'},
'php:t': {
'expand': True,
'opening_tag': '<?php',
'closing_tag': '?>',
},
'html:4t': { 'html:4t': {
'expand': True, 'expand': True,
'opening_tag': 'opening_tag':
Expand Down Expand Up @@ -217,6 +222,7 @@ class HtmlDialect(Dialect):
}, },
} }
synonyms = { synonyms = {
'php': 'php:t',
'checkbox': 'input:checkbox', 'checkbox': 'input:checkbox',
'check': 'input:checkbox', 'check': 'input:checkbox',
'input:c': 'input:checkbox', 'input:c': 'input:checkbox',
Expand Down

0 comments on commit 1d6cac9

Please sign in to comment.