Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #93 from nixon/phptag

add php tag
  • Loading branch information...
commit 219602423ad48b3a08d5c7ea4d1a3aae72b44e22 2 parents bb70843 + ba0b8fe
@faceleg faceleg authored
View
4 sparkup-unittest.py
@@ -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
6 sparkup.py
@@ -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',
View
2  vim/ftplugin/html/sparkup.vim
@@ -111,7 +111,7 @@ endfunction
function! s:SparkupNext()
" 1: empty tag, 2: empty attribute, 3: empty line
- let n = search('><\/\|\(""\)\|^\s*$', 'Wp')
+ let n = search('><\/\|\(""\)\|\(^\s*$\)', 'Wp')
if n == 3
startinsert!
else
Please sign in to comment.
Something went wrong with that request. Please try again.