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

Fix ref links in titles #17

Merged
merged 4 commits into from
Mar 16, 2017

Conversation

gribnoysup
Copy link
Contributor

Fixes #16

Tested both discussed solutions and "global" solution is another one byte smaller, so I went with it 😄

@developit
Copy link
Owner

Your commitment to size and simplicity is inspiring 😊

src/index.js Outdated
@@ -20,13 +20,14 @@ function encodeAttr(str) {
return (str+'').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}

let links = {};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one issue with the global version is that it won't get cleaned after each outer parse() call. So links declared in one document would be available as references in another.

Are you able to push the alternate contextual version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course!

@developit
Copy link
Owner

Not too bad, just a 6 byte increase. Looks good!

@developit developit merged commit 6e95b80 into developit:master Mar 16, 2017
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 this pull request may close these issues.

2 participants