SourceHut's method to create internal link anchor is a bit different from GitHub's.
For example, a function subheading Function: `error` is translated to #function-codeerrorcode
, which has explicit code
coming from backticks. On the other hand, current method of Fnldoc is to ignore such symbols.
text | github | sourcehut | compatible? |
---|---|---|---|
(backtick)code(backtick) |
code |
codecodecode |
NO |
file-exists? |
file-exists |
file-exists |
YES |
merge! |
merge |
merge |
YES |
wrap/line |
wrapline |
wrapline |
YES |
lines->text |
lines-text |
lines-gttext |
NO |
I don't know how the other code hosting services achieve this, but it should be safer to remove symbols such as backtick from subheadings.
EDIT: However, function name including
->
can't be handled well, according to the above table.
NACAMURA Mitsuhiro referenced this ticket in commit a395ae6.
A possible solution could be to add an option to switch between methods to generate subheading anchor. Pandoc has such an option for GitHub-flavoured Markdown:
Extension: gfm_auto_identifiers
Changes the algorithm used by auto_identifiers to conform to GitHub’s method. Spaces are converted to dashes (-), uppercase characters to lowercase characters, and punctuation characters other than - and _ are removed. Emojis are replaced by their names.