mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-30 11:28:10 -07:00
Fixed invalid processing order for inline markdown conversion
This commit is contained in:
@@ -279,8 +279,8 @@ class MarkdownToMicron:
|
|||||||
links.append((match.group(1), match.group(2)))
|
links.append((match.group(1), match.group(2)))
|
||||||
return f"\x00LINK{len(links)-1}\x00"
|
return f"\x00LINK{len(links)-1}\x00"
|
||||||
|
|
||||||
text = self.INLINE_CODE_RE.sub(extract_code, text)
|
|
||||||
text = self.LINK_RE.sub(extract_link, text)
|
text = self.LINK_RE.sub(extract_link, text)
|
||||||
|
text = self.INLINE_CODE_RE.sub(extract_code, text)
|
||||||
text = self.BOLD_RE.sub(self._bold_sub, text)
|
text = self.BOLD_RE.sub(self._bold_sub, text)
|
||||||
text = self.ITALIC_RE.sub(self._italic_sub, text)
|
text = self.ITALIC_RE.sub(self._italic_sub, text)
|
||||||
|
|
||||||
@@ -304,12 +304,6 @@ class MarkdownToMicron:
|
|||||||
def restore_code(match):
|
def restore_code(match):
|
||||||
idx = int(match.group(1))
|
idx = int(match.group(1))
|
||||||
content = code_blocks[idx]
|
content = code_blocks[idx]
|
||||||
|
|
||||||
# Disabled for now
|
|
||||||
# highlighted = self._highlight_inline_code(content)
|
|
||||||
# if highlighted: return highlighted
|
|
||||||
|
|
||||||
# Use plain inline code formatting
|
|
||||||
content = content.replace('`', '\\`')
|
content = content.replace('`', '\\`')
|
||||||
return f"{self.CODE_BG_INLINE}{self.CODE_FG}{content}{self.CODE_RESET}"
|
return f"{self.CODE_BG_INLINE}{self.CODE_FG}{content}{self.CODE_RESET}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user