You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have two md files in my wiki that I want to convert to html.
File1.md
# Title 1 of file 1
... content 1 ...
# Title 2 of file 1
... content 2 ...
GitHub automatically sets up anchors for the titles that I can reference in other wiki files to have a direct link.
File2.md
Here I can put a [Reference](File1#title-1-of-file-1) linked to title2 of file 1.
The thing is that when generating the html, because there is only one html page, this doesn't work. The reference put in the link in the html in my example is #File1title-1-of-file-1 instead of the expected #title-1-of-file-1
The text was updated successfully, but these errors were encountered:
_createClass(Helpers, null, [{
key: 'getPageIdFromFilenameOrLink',
value: function getPageIdFromFilenameOrLink(filename) {
var base = path.basename(filename);
if (base.substr(-3) === '.md') {
base = base.substr(0, base.length - 3);
}
var sp = base.split('#') // the problem comes from #PageId#AnchorId
if (sp.length == 2)
{
base = sp[1]
}
return base.replace(/([^a-z0-9\-_~.]+)/gi, '');
}
}]);
I just found a bug in this package with anchors.
Let's say I have two md files in my wiki that I want to convert to html.
File1.md
GitHub automatically sets up anchors for the titles that I can reference in other wiki files to have a direct link.
File2.md
The thing is that when generating the html, because there is only one html page, this doesn't work. The reference put in the link in the html in my example is #File1title-1-of-file-1 instead of the expected #title-1-of-file-1
The text was updated successfully, but these errors were encountered: