branch: master
commit 42ecef5863b86b5ed332b049f8b63e5143f87db1
Author: Akinori MUSHA <[email protected]>
Commit: Akinori MUSHA <[email protected]>
Allow omitting the close tag of the last PHP code block.
It is common manners to omit the close tag to avoid the trailing newline
problem.
---
mmm-sample.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mmm-sample.el b/mmm-sample.el
index 6320a31..0f31ae2 100644
--- a/mmm-sample.el
+++ b/mmm-sample.el
@@ -320,7 +320,7 @@ and MODE is a major mode function symbol.")
:submode php-mode
:face mmm-output-submode-face
:front "<\\?php *echo "
- :back "\\?>"
+ :back "\\(\\?>\\|\\'\\)"
:include-front t
:front-offset 5
:insert ((?e php-echo nil @ "<?php" @ " echo " _ " " @ "?>" @))
@@ -329,7 +329,7 @@ and MODE is a major mode function symbol.")
:submode php-mode
:face mmm-code-submode-face
:front "<\\?\\(php\\)?"
- :back "\\?>"
+ :back "\\(\\?>\\|\\'\\)"
:insert ((?p php-section nil @ "<?php" @ " " _ " " @ "?>" @)
(?b php-block nil @ "<?php" @ "\n" _ "\n" @ "?>" @))
)))