diff --git a/comp/src/gb.markdown/.src/Markup.module b/comp/src/gb.markdown/.src/Markup.module index 5f552a808..8e7f08123 100644 --- a/comp/src/gb.markdown/.src/Markup.module +++ b/comp/src/gb.markdown/.src/Markup.module @@ -673,11 +673,21 @@ ENTER_MARKUP: If Left$(sPattern) = "/" Then sPattern = Mid$(sPattern, 2) If Not ["img", "hr", "br"].Exist(sPattern) Then - If $aMarkup.Count = 0 Then - Error.Raise("Mismatched markup: ") - Else If LCase($aMarkup[$aMarkup.Max]) <> LCase(sPattern) Then - Error.Raise("Mismatched markup: against <" & $aMarkup[$aMarkup.Max] & ">") - Endif + + Do + If $aMarkup.Count = 0 Then Error.Raise("Mismatched markup: ") + + If LCase($aMarkup[$aMarkup.Max]) <> LCase(sPattern) Then + If LCase($aMarkup[$aMarkup.Max]) = "

" Then + sResult &= "

" + $aMarkup.Remove($aMarkup.Max) + Continue + Endif + Error.Raise("Mismatched markup: against <" & $aMarkup[$aMarkup.Max] & ">") + Endif + + Loop + sResult &= "" $aMarkup.Remove($aMarkup.Max) Endif