Skip to content

Conversation

@matsl
Copy link
Collaborator

@matsl matsl commented Jan 5, 2026

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.

@matsl matsl requested a review from rswgnu January 5, 2026 23:27
@rswgnu
Copy link
Owner

rswgnu commented Jan 11, 2026

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.

@matsl
Copy link
Collaborator Author

matsl commented Jan 24, 2026

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:

  • When the WikiWord is given without any quotes or other delimiters treat dashes in section references as meaning space. This is the current behavior.
  • When quotes or delimiters are used do no conversion. Treat section references verbatim. (This is a change.)

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

@rswgnu
Copy link
Owner

rswgnu commented Jan 24, 2026 via email

@matsl
Copy link
Collaborator Author

matsl commented Jan 24, 2026

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.

@rswgnu
Copy link
Owner

rswgnu commented Jan 25, 2026 via email

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.

3 participants