We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e1f281 commit f3db860Copy full SHA for f3db860
1 file changed
lib/macro_storage_format_parser.py
@@ -18,7 +18,8 @@ def _split_macro_body_on_content_block(self, macro_body: str) -> tuple[str, str]
18
if "[content]" in macro_body:
19
splitted = re.split(r'\[content\]\s*(\r\n|\r|\n\r|\n)', macro_body, maxsplit=1)
20
# re.split splits also the capturing group \n as [1]!
21
- return (splitted[0], splitted[2])
+ if len(splitted) > 2:
22
+ return (splitted[0], splitted[2])
23
return ("ERROR SPLITTING AT [CONTENT]", "ERROR: INVALID NEWLINE")
24
25
def transform(self):
0 commit comments