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

Formatted view can't handle "complex" page names #3

Open
Stvad opened this issue Apr 17, 2020 · 2 comments
Open

Formatted view can't handle "complex" page names #3

Stvad opened this issue Apr 17, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Stvad
Copy link

Stvad commented Apr 17, 2020

Thank you for building this - it is glorious.

The issue I noticed is that formatted view does not properly support the complex page names (and I use them extensively).
What I mean by complex page names is the names that contain references to the other pages. For example [[[[search]] [[algorithm]]]] is a complex page name that links to both [[search]] and [[algorithm]] the exporter currently does not parse/render such links properly

To add another example - I have a page [[Respecting [[level of [[abstraction]]]]]] (looks scary but blessedly you can hide brackets :p)
currently exporter renders the link as follows:
/blob/master/formatted/Respecting%20%5B%5Blevel%20of%20%5B%5Babstraction.md (the address is broken and does not in fact point to the page because of the missing brackets).
Also it is attaching the link to the abstraction (innermost page) instead of the whole thing.

@MatthieuBizien
Copy link
Owner

It looks too scary, so I don't use complex page names myself ;)

I tried your example, a link render as [Respecting [[level of [[abstraction](<Respecting [[level of [[abstraction.md>)]]]], ie with markdown format.

[Respecting [[level of [abstraction]]]]

You can see it in the new demo. This is much better than what you got, but I'm not sure what the difference is. Only the last part is correctly linked. It's a limitation of current parser, that use regex.

If you have an idea on how to improve that, a PR would be welcome 😃

@MatthieuBizien MatthieuBizien added the enhancement New feature or request label Apr 19, 2020
@Stvad
Copy link
Author

Stvad commented Apr 19, 2020

It looks too scary, so I don't use complex page names myself ;)

It looks alright if you hide brackets ;) (Ctrl-c Ctrl-b)

[Respecting [[level of [abstraction]]]]

I misspoke - it renders for me similar to what you have, but the link is broken and does not lead to any actual page (same story for your link).

I suspect the recursive regex patterns may help to parse this better.

@MatthieuBizien MatthieuBizien added the help wanted Extra attention is needed label Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants