-
Notifications
You must be signed in to change notification settings - Fork 12
Use delimiters for links with space in HyWiki #838
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
Conversation
|
Since I believe this works properly already outside of publishing and it is harder when typing a section reference to add delimiters around the reference than to type dashes, let's discuss and decide. |
OK. Since we decided to keep the current behavior I'm now coming back to this task (which will be implemented in another PR but easier to follow up here.) What do you think of this compromise:
This would allow using references to headers that contains dashes by quoting them. I have not checked how easy it is to know if a WikiWord is quoted or "delimited" but should not be to hard I hope. Or shall we just make headers with dashes not possible to link to? What do you think? @rswgnu |
|
I am open to the suggested change but want to understand the problem better via an example first. Show a header that you can’t link to now and why. If a header has a dash, then the link should encode it as two dashes within Org. In html, we are using Org generated ids instead.
|
|
With dash in a link meaning a space in the target you can't link to a header that contains a dash. Using two dashes for a single dash is of course an alternative. We don't support that now. So you prefer that to using quotes? And should then the double dash be required if the WikiWord is quoted? "WikiWord#header--header" to link to "* header-header"? It would make implementation easier but looks a bit strange to me. |
|
If you replace spaces with dashes, then you don’t need delimiters, so if you use delimiters, it is reasonable to just include the header literally and not do any dash replacement.
|
Yes, I think that makes sense. So to summarize:
Examples: Right? This also means we need to understand if the action is invoked within delimiters or not. |
|
Yes, that all looks right.
… Message ID: ***@***.***>
|
|
Thanks. I'll close this PR and start working on implementing the described functionality. |
What
Use delimiters for links with space in HyWiki.
Why
Do no convert links containing dashes to space. Use links as they are
written just like org does. Publishing is thus close to what org
supports and close to how org links are written (without the org link
delimiters.).
Note
HyWiki links will thus be different from Hyperboles path links where
links can be given either as a delimited string with spaces or a
string where dashes represent space in the linked header. So old
behavior remains there.
Docstrings that mentions dash to space conversion has not been updated
yet. Will do that if we choose this solution.