A React Native app for the ultimate thinking partner.

fix(markdown): normalize bullets (–, •, —) to '- ', unescape common markdown punctuation, trim stray trailing backslash; improves bold and lists rendering

+8
+8
src/components/MessageContent.tsx
··· 32 32 .replace(/\\r\\n/g, '\n') // escaped CRLF 33 33 .replace(/\\n/g, '\n') // escaped LF 34 34 .replace(/\\t/g, '\t'); // escaped tab 35 + // Normalize common non-Markdown bullets to hyphen-space 36 + s = s 37 + .replace(/^\s*[–•]\s+/gm, '- ') // en dash or dot bullet 38 + .replace(/^\s*—\s+/gm, '- '); // em dash bullet 39 + // Unescape common markdown punctuation that sometimes arrives escaped 40 + s = s.replace(/\\([*_`#>\-])/g, '$1'); 41 + // Remove a stray trailing backslash from incomplete escapes 42 + s = s.replace(/\\$/, ''); 35 43 // Collapse excessive blank lines to reasonable spacing 36 44 s = s.replace(/\n{3,}/g, '\n\n'); 37 45 return s;