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

Markdown parsing breaks internal README links #3

Open
adlai opened this issue Oct 27, 2022 · 5 comments
Open

Markdown parsing breaks internal README links #3

adlai opened this issue Oct 27, 2022 · 5 comments

Comments

@adlai
Copy link

adlai commented Oct 27, 2022

Steps to reproduce: try clicking any of these links; the actual anchors in the generated HTML document served by quickdocs are named sequentially, but this renaming does not occur in the link anchors.

Following from this invocation, it appears that this call would rewrite the anchor IDs if suppressAutoLink were false, which is default value; I am tempted to open a PR simply deleting that key from the function call, although I do not currently have quickdocs setup locally for testing this.

@fukamachi
Copy link
Member

The README seems to be originally written in org-mode.
Currently, it is rendered in the frontend by org-js.

@adlai
Copy link
Author

adlai commented Oct 27, 2022

After some sandbox testing of only the parsing:

The fix is probably not so simple, because the internal links do not get recognized by this regex, due to not being complete URIs (they are only anchors). I suspect the proper way to fix this would be mostly within org-js, rather than here.

@adlai
Copy link
Author

adlai commented Dec 16, 2022

Currently, it is rendered in the frontend by org-js.

Would it be sane of me, to move the rendering to dist-extractor? It is my inclination, although only due to an aversion towards further work in Javascript.

@fukamachi
Copy link
Member

It is a possible way. In fact, that is how it was done in Quickdocs before the rewrite.
I'm still not sure whether it should be done in dist-extractor or dist-updater, though.

@adlai
Copy link
Author

adlai commented Dec 26, 2022

I'm still not sure whether it should be done in dist-extractor or dist-updater, though.

I considered asking your opinion first... I have skimmed both projects now, and my impression is that it could be done in either one, and almost certainly the change should only affect one of these two projects. I'm not certain why I considered it obvious when writing my previous comment.

In fact, that is how it was done in Quickdocs before the rewrite.

I skimmed the archived code (thank you for leaving this online!), and it appears that the rendering was originally done in the updater component, using the external tool pandoc. Is reintroducing the dependency acceptable?

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

No branches or pull requests

2 participants