Move the coding of angle brackets in HTML to the innermost function in the chain (#821)

This commit is contained in:
Veronica Berglyd Olsen
2021-07-04 18:05:26 +02:00
committed by GitHub
parent 72fd2990e7
commit 1d16cc2a03
4 changed files with 9 additions and 66 deletions
-12
View File
@@ -459,28 +459,16 @@ class Tokenizer():
if aLine.startswith(">>"):
tagRight = True
aLine = aLine[2:].lstrip(" ")
elif aLine.startswith(">>"):
tagRight = True
aLine = aLine[8:].lstrip(" ")
elif aLine.startswith(">"):
indLeft = True
aLine = aLine[1:].lstrip(" ")
elif aLine.startswith(">"):
indLeft = True
aLine = aLine[4:].lstrip(" ")
if aLine.endswith("<<"):
tagLeft = True
aLine = aLine[:-2].rstrip(" ")
elif aLine.endswith("&lt;&lt;"):
tagLeft = True
aLine = aLine[:-8].rstrip(" ")
elif aLine.endswith("<"):
indRight = True
aLine = aLine[:-1].rstrip(" ")
elif aLine.endswith("&lt;"):
indRight = True
aLine = aLine[:-4].rstrip(" ")
textAlign = defAlign
if tagLeft and tagRight: