~m15a/fnldoc#17: 
Internal link does not work for sourcehut

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.

#Known compatibilities

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
Status
REPORTED
Submitter
~m15a
Assigned to
No-one
Submitted
1 year, 3 months ago
Updated
1 year, 3 months ago
Labels
bug

~m15a 1 year, 3 months ago*

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.

~m15a 1 year, 3 months ago

NACAMURA Mitsuhiro referenced this ticket in commit a395ae6.

~m15a 1 year, 3 months ago

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.

Register here or Log in to comment, or comment via email.