Comment #7 by Moviga TECHNOLOGIES:
Well, one of the latest I've been working on is this:
Public Sub FormatPost(Post As String) As String
Dim sNewPost As String
Dim sSplitPost As String[]
Dim iLastPos As Integer = 1
Dim iStart As Integer
Dim iEnd As Integer
If InStr(Post, "[code=gambas]", iLastPos) > 0 Then
While InStr(Post, "[code=gambas]", iLastPos) > 0
sSplitPost = New String[]
iStart = InStr(Post, "[code=gambas]", iLastPos)
sSplitPost.Add(Html(Mid(Post, IIf(iEnd > 0, iEnd + 7, 1), iStart -
IIf(iEnd > 0, iEnd + 7, 1))))
iEnd = InStr(Post, "[/code]", iLastPos)
iLastPos = iEnd + 6
sSplitPost.Add("<code>" & GambasCode.Higlight(Trim(Mid(Post, iStart + 13,
iEnd - iStart - 13))) & "</code>")
sNewPost &= sSplitPost.Join("")
'Break
Wend
sNewPost &= Html(Right(Post, Len(Post) - iEnd - 6))
Else
sNewPost = Post
sNewPost = Html(sNewPost)
Endif
sNewPost = Markdown.ToHTML(sNewPost)
Return sNewPost
End
Commenting out the sSpilPost.Add( ... lines has failed many times
The most resent was just simply
'Session.Abandon()
I removed the ', but it was not run until I moved it to a different line...
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user