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

Handle spaces in SCDoc internal links #2135

Closed
wants to merge 2 commits into from

Conversation

nhthn
Copy link
Contributor

@nhthn nhthn commented May 28, 2016

Fixes #1650. I cherrypicked a451a06 because I was too lazy to figure out how to properly deal with the scvim submodule. (If I tried to checkout James' branch then I got an error that the scvim directory would be overwritten.)

@jamshark70 Please try this and let me know if it fixes the bug. I can't reproduce it in Firefox.

@nhthn nhthn added comp: SCDoc scdoc syntax, parser, and renderer. for changes to schelp files, use "comp: help" waiting for testing labels May 28, 2016
@crucialfelix crucialfelix added this to the 3.8 milestone May 30, 2016
@nhthn
Copy link
Contributor Author

nhthn commented Aug 8, 2016

@jamshark70 any comments?

@@ -396,11 +402,11 @@ SCDocHTMLRenderer {
stream << "<span class='soft'>" << this.escapeSpecialChars(node.text) << "</span>";
},
\ANCHOR, {
stream << "<a class='anchor' name='" << node.text << "'>&nbsp;</a>";
stream << "<a class='anchor' name='" << this.escapeSpacesInAnchor(node.text) << "'>&nbsp;</a>";
Copy link
Member

Choose a reason for hiding this comment

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

The spacing is off here. Shouldn't introduce all that white space; it should be even with the other ones on the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

damnit, this is why spaces > tabs

@crucialfelix
Copy link
Member

builds fine, help appears to be fine. I am still looking for a link with a # and a space in it. I searched the docs and don't find any.

maybe Emacs Editor

Emacs shortcut, check out this link::http://lpn.rnbhq.org/tools/xemacs/emacs_ref.html##Emacs reference::.

but that generates

http://lpn.rnbhq.org/tools/xemacs/emacs_ref.html

ah but the ## here are part of schelp markup

and the link there is dead anyway (the domain is gone)

@crucialfelix
Copy link
Member

btw. here is a test with encodeURI:

https://jsfiddle.net/u9nc4h9g/

@crucialfelix
Copy link
Member

@snappizz can you enable the checkbox for "allow maintainers to contribute" (on the right side of this)

That would allow me to more easily fix the conflict. Of course you can fix the conflict too if you want.

@nhthn
Copy link
Contributor Author

nhthn commented Sep 9, 2016

done. have at it!

@crucialfelix
Copy link
Member

conflict fixed and ready to merge here: #2135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: SCDoc scdoc syntax, parser, and renderer. for changes to schelp files, use "comp: help" has-conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants