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
The reason 2. is useful is that a lot of packages (especially ones that use TocDoc such as autoform), use fragment links in a table of contents in their readmes. This works on GH because GH adds (somehow) ids to all headers. So NPM does the same with marky.
It's slightly complex because to avoid id clashes, they use user-content-X where X is a canonicalized version of the heading's text, so we also need to write some code equivalent to https://github.com/npm/newww/blob/master/assets/scripts/deep-links.js to handle the rerouting of #X to #user-content-X. But this is possible.
Some packages that are useful when testing this stuff:
@zol can you review the PR above and if you think the approach is sensible, hand over to Dom for some hopefully minor CSS fixes that are required. (See description above)
Continuation of #339
Npm has switched (published?) a package that they use to do their markdown formatting: https://github.com/npm/marky-markdown
Principal benefits:
id
s and links to all headings.The reason 2. is useful is that a lot of packages (especially ones that use TocDoc such as autoform), use fragment links in a table of contents in their readmes. This works on GH because GH adds (somehow)
id
s to all headers. So NPM does the same with marky.It's slightly complex because to avoid id clashes, they use
user-content-X
whereX
is a canonicalized version of the heading's text, so we also need to write some code equivalent to https://github.com/npm/newww/blob/master/assets/scripts/deep-links.js to handle the rerouting of#X
to#user-content-X
. But this is possible.Some packages that are useful when testing this stuff:
CSS fixes required
Marky has some slight differences in CSS output to GHFM that we need to deal with:
<pre>
tags for some odd reasonWhat GH do is make the
<a>
element appear when you hover over the heading to the LHS as a "permalink" indicator (ss of what I'm talking about: https://www.dropbox.com/s/c7al9utmruf7ghn/Screenshot%202015-12-31%2013.33.24.png?dl=0).We could optionally do this, although the headings acts as permalinks anyway, so it's NBD
The text was updated successfully, but these errors were encountered: