diff options
| author | Uwe Tews <uwe.tews@googlemail.com> | 2015-05-16 13:33:04 +0200 |
|---|---|---|
| committer | Uwe Tews <uwe.tews@googlemail.com> | 2015-05-16 13:33:04 +0200 |
| commit | a74804b061f2486c2d58441039c80b3ff7ab0805 (patch) | |
| tree | 710e025509b277eceefebacd66c466eb65019895 /lexer/smarty_internal_templatelexer.plex | |
| parent | 9f1061f5bc10094953bca4682e7f58a877a93627 (diff) | |
| download | smarty-a74804b061f2486c2d58441039c80b3ff7ab0805.tar.gz smarty-a74804b061f2486c2d58441039c80b3ff7ab0805.tar.bz2 smarty-a74804b061f2486c2d58441039c80b3ff7ab0805.zip | |
- bugfix {php}{/php} did work just for single lines https://github.com/smarty-php/smarty/issues/33
Diffstat (limited to 'lexer/smarty_internal_templatelexer.plex')
| -rw-r--r-- | lexer/smarty_internal_templatelexer.plex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index c41fe10b..5e6f293a 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -234,10 +234,10 @@ class Smarty_Internal_Templatelexer all = /[\S\s]+/ emptyjava = /\{\}/ xmltag = /<\?xml\s+([\S\s]*?)\?>/ - php = /(<\?(?:php\s+|=)?)((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*(.)*?\*\/)|.)*?)\?>/ - phpscript = /<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*(.)*?\*\/)|.)*?)<\/script>/ - phptag = /(SMARTYldel\s*php\s*(.)*?SMARTYrdel((.)*?)SMARTYldel\s*\/php\s*SMARTYrdel)|(SMARTYldel\s*[\/]?php\s*(.)*?SMARTYrdel)/ - asp = /<%((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*(.)*?\*\/)|.)*?)%>/ + php = /(<\?(?:php\s+|=)?)((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*[\S\s]*?\*\/)|[\S\s])*?)\?>/ + phpscript = /<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*[\S\s]*?\*\/)|[\S\s])*?)<\/script>/ + phptag = /(SMARTYldel\s*php\s*(.)*?SMARTYrdel([\S\s]*?)SMARTYldel\s*\/php\s*SMARTYrdel)|(SMARTYldel\s*[\/]?php\s*(.)*?SMARTYrdel)/ + asp = /<%((('[^'\\]*(?:\\.[^'\\]*)*')|("[^"\\]*(?:\\.[^"\\]*)*")|(\/\*[\S\s]*?\*\/)|[\S\s])*?)%>/ unmatched = /(<(\?(?:php\s+|=)?|(script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>)|%))|\?>|%>/ slash = /\// ldel = /SMARTYldel\s*/ |
