Add support for triple hash alt header format
This commit is contained in:
@@ -1651,6 +1651,9 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
elif text.startswith("##! "):
|
||||
temp = text[4:]
|
||||
offset = 4
|
||||
elif text.startswith("###! "):
|
||||
temp = text[5:]
|
||||
offset = 5
|
||||
elif text.startswith(">> "):
|
||||
temp = text[3:]
|
||||
offset = 3
|
||||
|
||||
@@ -300,7 +300,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
# so we force a return here
|
||||
return
|
||||
|
||||
elif text.startswith(("# ", "#! ", "## ", "##! ", "### ", "#### ")):
|
||||
elif text.startswith(("# ", "#! ", "## ", "##! ", "### ", "###! ", "#### ")):
|
||||
self.setCurrentBlockState(self.BLOCK_TITLE)
|
||||
|
||||
if text.startswith("# "): # Heading 1
|
||||
@@ -327,6 +327,10 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
self.setFormat(0, 3, self._hStyles["head2h"])
|
||||
self.setFormat(3, len(text), self._hStyles["header2"])
|
||||
|
||||
elif text.startswith("###! "): # Hard Scene
|
||||
self.setFormat(0, 4, self._hStyles["head3h"])
|
||||
self.setFormat(4, len(text), self._hStyles["header3"])
|
||||
|
||||
elif text.startswith("%"): # Comments
|
||||
self.setCurrentBlockState(self.BLOCK_TEXT)
|
||||
cStyle, _, cPos = processComment(text)
|
||||
|
||||
Reference in New Issue
Block a user