yml2.py
changeset 23 f2e8837da4e9
parent 20 c936066cff62
child 25 cb4a7f8b230d
child 28 e9a51b1d5587
--- a/yml2.py	Wed Aug 29 23:57:58 2018 +0200
+++ b/yml2.py	Tue Nov 20 22:35:22 2018 +0100
@@ -1,4 +1,4 @@
-# YML 2.5.8 language definition
+# YML 2.5.9 language definition
 
 # written by VB.
 
@@ -77,7 +77,7 @@
 def constant():     return 0, keyword("define"), [pointer, symbol], "=", literal, 0, [";", "."]
 def in_ns():        return keyword("in"), xmlSymbol, [_decl, ("{", -2, _decl, "}")]
 _decl = keyword("decl"), listing(decl), [";", "."]
-def textsection():  return r(r'(\|\|(\>*).*?\|\|(\>*))', re.S)
+def textsection():  return r(r'(\|\|(\>*)(.*?)\|\|(\>*))\s*$', re.S | re.M)
 def textsectionu(): return r(r'(\>\>.*?\>\>)', re.S)
 def include():      return keyword("include"), 0, reverse, 0, [ktext, kxml], filename, 0, [";", "."]
 def func():         return _func, 0, content