[GB.MARKDOWN]
* BUG: Fix markup mismatch detection again. git-svn-id: svn://localhost/gambas/trunk@6173 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
83d7271afc
commit
88762a4e47
1 changed files with 15 additions and 5 deletions
|
@ -673,11 +673,21 @@ ENTER_MARKUP:
|
||||||
If Left$(sPattern) = "/" Then
|
If Left$(sPattern) = "/" Then
|
||||||
sPattern = Mid$(sPattern, 2)
|
sPattern = Mid$(sPattern, 2)
|
||||||
If Not ["img", "hr", "br"].Exist(sPattern) Then
|
If Not ["img", "hr", "br"].Exist(sPattern) Then
|
||||||
If $aMarkup.Count = 0 Then
|
|
||||||
Error.Raise("Mismatched markup: </" & sPattern & ">")
|
Do
|
||||||
Else If LCase($aMarkup[$aMarkup.Max]) <> LCase(sPattern) Then
|
If $aMarkup.Count = 0 Then Error.Raise("Mismatched markup: </" & sPattern & ">")
|
||||||
Error.Raise("Mismatched markup: </" & sPattern & "> against <" & $aMarkup[$aMarkup.Max] & ">")
|
|
||||||
Endif
|
If LCase($aMarkup[$aMarkup.Max]) <> LCase(sPattern) Then
|
||||||
|
If LCase($aMarkup[$aMarkup.Max]) = "<p>" Then
|
||||||
|
sResult &= "</p>"
|
||||||
|
$aMarkup.Remove($aMarkup.Max)
|
||||||
|
Continue
|
||||||
|
Endif
|
||||||
|
Error.Raise("Mismatched markup: </" & sPattern & "> against <" & $aMarkup[$aMarkup.Max] & ">")
|
||||||
|
Endif
|
||||||
|
|
||||||
|
Loop
|
||||||
|
|
||||||
sResult &= "</" & sPattern & ">"
|
sResult &= "</" & sPattern & ">"
|
||||||
$aMarkup.Remove($aMarkup.Max)
|
$aMarkup.Remove($aMarkup.Max)
|
||||||
Endif
|
Endif
|
||||||
|
|
Loading…
Reference in a new issue