Files
TimeTracker/app
MacJediWizard 7394af7940 fix(markdown): unescape Toast UI Editor over-escaping in markdown filter
Task and note descriptions saved through the Toast UI WYSIWYG editor
came back wrapped in CommonMark-style escapes that Python markdown
either does not honour (\, → literal \,) or honours in a way that
breaks rendering (line-leading \- prevents list parsing).

The visible symptom on /tasks/<id>: bullet lists rendered as a single
flat paragraph with literal backslashes peppered between words.

Add a normaliser run before _md.markdown(...) that:
- Restores line-leading bullets that the editor escaped (\-/\*/\+
  followed by whitespace at start of line).
- Strips backslashes before punctuation Python markdown does not
  recognise as a valid escape (commas, colons, semicolons, etc.).

This handles existing rows in the DB without any data migration. The
normaliser leaves alone backslashes before punctuation Python markdown
does handle natively (\. \( \) \+ \- mid-line, \* \_ \# etc.)
so author-intent escapes still render correctly.

Strikethrough (~~text~~) still does not render because the 'extra'
extension does not include it; that is a separate enhancement.
2026-05-07 11:36:15 -04:00
..