Permalink
Browse files

add php tag

  • Loading branch information...
1 parent bb70843 commit 1d6cac9be8f385cc4ebdf2a69b8ca612eb5677c3 @nixon nixon committed Dec 20, 2013
Showing with 10 additions and 0 deletions.
  1. +4 −0 sparkup-unittest.py
  2. +6 −0 sparkup.py
View
@@ -99,6 +99,10 @@ class SparkupTest:
'input': 'p [attrib=text.com]',
'output': '<p attrib="text.com">$1</p>$0'
},
+ 'PHP tag test': {
+ 'input': 'php',
+ 'output': '<?php\n $1\n?>$0',
+ },
'Nested curly braces test': {
'input': 'p{{{ title }}}',
'output': '<p>{{ title }}</p>$0'
View
@@ -37,6 +37,11 @@ class HtmlDialect(Dialect):
'cc:noie': {
'opening_tag': '<!--[if !IE]><!-->',
'closing_tag': '<!--<![endif]-->'},
+ 'php:t': {
+ 'expand': True,
+ 'opening_tag': '<?php',
+ 'closing_tag': '?>',
+ },
'html:4t': {
'expand': True,
'opening_tag':
@@ -217,6 +222,7 @@ class HtmlDialect(Dialect):
},
}
synonyms = {
+ 'php': 'php:t',
'checkbox': 'input:checkbox',
'check': 'input:checkbox',
'input:c': 'input:checkbox',

0 comments on commit 1d6cac9

Please sign in to comment.