Markdown.LinkAnchors is a new property that insert anchors for each line of the markdown text.

[GB.MARKDOWN]
* NEW: Markdown.LinkAnchors is a new property that insert anchors for each line of the markdown text.
This commit is contained in:
gambas 2021-01-26 06:13:44 +01:00
parent 2c03f0a7c7
commit bb43074533
2 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,7 @@ Create
Public Line As Integer
Public Current As String
Public Reinterpret As Boolean = True
Public LinkAnchors As Boolean
Property Verbatim As Integer

View file

@ -126,6 +126,8 @@ Private Sub ConvertMarkup(aLine As String[], Optional bDoNotSetLine As Boolean)
Inc iLine
sLine = aLine[iLine]
If $hMarkdown.LinkAnchors Then aResult.Add("<a id=\"l" & CStr(iLine) & "\"></a>")
If Not bDoNotSetLine Then
$hMarkdown.Line = iLine
$hMarkdown.Current = sLine
@ -551,6 +553,8 @@ Private Sub ConvertMarkup(aLine As String[], Optional bDoNotSetLine As Boolean)
aResult[iIndexPos] = "<div class=\"index\">\n" & ConvertMarkup($aIndex) & "</div>\n"
Endif
If $hMarkdown.LinkAnchors Then aResult.Add("<a id=\"l" & CStr(iLine) & "\"></a>")
$bComment = bSaveComment
$aMarkup = aSaveMarkup
$aTable = aSaveTable