@@ -753,7 +753,9 @@ function markdownToText(md: string): string {
753753 . replace ( / ` ` ` [ \s \S ] * ?` ` ` / g, '' ) // fenced code blocks
754754 . replace ( / ` [ ^ ` ] + ` / g, '' ) // inline code
755755 . replace ( / - - \{ \{ [ \d \s \- ] + \} \} - - / g, '' ) // LiaScript block animations --{{n}}--
756- . replace ( / \{ \{ [ \d \s \- ] + \} \} / g, '' ) // LiaScript inline animations {{n}} / {{n-m}}
756+ . replace ( / \{ \{ [ ^ \} ] + \} \} / g, '' ) // LiaScript inline animations {{n}} / {{n-m}}
757+ . replace ( / \[ \[ [ ^ \] ] + \} \] / g, '' ) // LiaScript quizzes [[X]]
758+ . replace ( / \[ \( [ ^ \) ] + \) \] / g, '' ) // LiaScript quizzes [(X)]
757759 . replace ( / @ [ \w . ] + ( \( [ ^ ) ] * \) ) ? / g, '' ) // LiaScript macros @Macro or @Macro(...)
758760 . replace ( / < [ ^ > ] + > / g, '' ) // HTML tags
759761 . replace ( / ! \[ .* ?\] \( .* ?\) / g, '' ) // images
@@ -763,6 +765,8 @@ function markdownToText(md: string): string {
763765 . replace ( / ^ \s * [ - * + > ] \s + / gm, '' ) // list markers / blockquotes
764766 . replace ( / [ | \- ] { 2 , } / g, ' ' ) // table separators
765767 . replace ( / \s + / g, ' ' )
768+ . replace ( / \* { 3 , } / g, '' ) // excess asterisks
769+ . replace ( / \- { 2 , } / g, '' ) // excess dashes
766770 . trim ( )
767771}
768772
0 commit comments