Commit 22f67aca authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix for the italic conversion

parent a88ef036
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR
					# Italic replacements
					# Regex to detect markdown italic formatting in cell content
					if cell.content is not None:
						cell.content = matchItalic.sub(r'<i>\g<text></i>', cell.content)
						cell.content = matchItalic.sub(r'\1<i>\g<text></i>', cell.content)

	# Correct newlines characters
	for headerRow in headerRows:
+1 −1
Original line number Diff line number Diff line
@@ -37,4 +37,4 @@ matchTable = re.compile(r'^\s*\|.*\|\s*$', re.IGNORECASE)
matchTableSeparator = re.compile(r'^\s*\|([-: ]+\|)+\s*$', re.IGNORECASE)

matchBold =   re.compile(r'(^|\s)(\*\*|__)(?P<text>.+?)\2(?!\w)')
matchItalic = re.compile(r'(^|\s)(\*|_)(?P<text>.+?)(?<!\\)\3(\s|$)')
matchItalic =   re.compile(r'(^|\s)(\*|_)(?P<text>.+?)\2(?!\w)')
 No newline at end of file