Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on anchors adds backslashes before periods #57

Closed
glasser opened this issue Mar 26, 2018 · 6 comments · Fixed by #60
Closed

Clicking on anchors adds backslashes before periods #57

glasser opened this issue Mar 26, 2018 · 6 comments · Fixed by #60

Comments

@glasser
Copy link

glasser commented Mar 26, 2018

Where did the backslashes come from? They break links. Note that "copy link address" on the link gets the right error without backslash.

@abernix this might be up your alley?

@abernix
Copy link
Contributor

abernix commented Mar 27, 2018

Yes, I've seen this and I presume it's something in our scripts doing it (probably the thing that highlights the sidebar or auto-expands the sub-headings when you're within that section?) but haven't looked into what it is yet.

abernix added a commit to meteor/theme-example that referenced this issue Mar 29, 2018
Specifically to test the below-referenced issue in the future.

Ref: meteor/meteor-theme-hexo#57
abernix added a commit that referenced this issue Mar 29, 2018
The version of `smooth-scroll` we were using was quite old (v7.1.1) compared
to what is now available (v12).  By upgrading to the latest version, and
slightly tweaking the way we instantiate it to support the new construct,
this resolves the issue with anchor tags with periods being incorrectly
escaped.

Fixes #57.
abernix added a commit that referenced this issue Mar 29, 2018
The version of `smooth-scroll` we were using was quite old (v7.1.1) compared
to what is now available (v12).  By upgrading to the latest version, and
slightly tweaking the way we instantiate it to support the new construct,
this resolves the issue with anchor tags with periods being incorrectly
escaped.

Fixes #57.
@abernix
Copy link
Contributor

abernix commented Mar 29, 2018

This hadn't been a more prominent problem until proxy-release-notes.md since markdown header-syntax (e.g. #, ##, ###) normally replaces symbols (something along the lines of [\W], I believe) with hyphens (-) when it generates the ids for the resulting <h#> tags.

In the case of proxy-release-notes.md (and other newer docs markdown), we manually generate the anchor to prevent it from breaking permalinks if we change the header itself, and the proxy versions are some of the only headers which utilize periods (à la, 1.0.4) causing this smooth-scroll bug to rear its head.

Anyhow, fixed with an upgrade of smooth-scroll (which is now served via CDN too). 248d0ba.

Thanks for reporting this!

@glasser
Copy link
Author

glasser commented Mar 29, 2018

Yeah, I didn't think it was helpful to include dates in the anchors along with the version number. Thanks!

@abernix
Copy link
Contributor

abernix commented Mar 29, 2018

What you did absolutely makes sense, just verbalizing the reason why this is cropping up now. I'll deploy this next week after I've bunched some more features to reduce PR/update noise.

@abernix
Copy link
Contributor

abernix commented Apr 6, 2018

@glasser This is deployed now to the Engine docs! (i.e. fixed).

@glasser
Copy link
Author

glasser commented Apr 6, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants