fixed BFC INVERTNEXT being interpreted as a header command

Sat, 01 Jun 2019 10:47:58 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 01 Jun 2019 10:47:58 +0300
changeset 56
ed6d39c59e56
parent 55
388df1fa18a2
child 57
c147116768f4

fixed BFC INVERTNEXT being interpreted as a header command

header.py file | annotate | diff | comparison | revisions
--- a/header.py	Sat Jun 01 10:47:27 2019 +0300
+++ b/header.py	Sat Jun 01 10:47:58 2019 +0300
@@ -43,7 +43,14 @@
     linetypes.ConditionalLine,
 ]
 
+def is_invertnext(entry):
+    return isinstance(entry, linetypes.MetaCommand) \
+        and entry.text == "BFC INVERTNEXT"
+
 def is_suitable_header_object(entry):
+    if is_invertnext(entry):
+        # BFC INVERTNEXT is not a header command anymore.
+        return False
     return not any(
         isinstance(entry, linetype)
         for linetype in [

mercurial