gambas-source-code/app/examples/Web/SmallWiki/.src/WikiMarkdown.class
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +00:00

31 lines
557 B
Text

' Gambas class file
Inherits Markdown
Public Sub Link(hLink As MarkdownLink)
Dim sPath As String
If hLink.Link Begins "/" Then
sPath = Mid$(hLink.Link, 2)
Else If hLink.Link Begins "./" Then
sPath = Request.Path &/ Mid$(hLink.Link, 3)
Else
Return
Endif
If Not hLink.Text Then
If Main.IsImage(sPath) Then
hLink.Html = "<img src=\"" & Application.Root &/ sPath & "?show\" />"
Return
Endif
hLink.Text = Main.GetPageTitle(sPath)
Endif
hLink.Link = Application.Root &/ sPath
End