-
Notifications
You must be signed in to change notification settings - Fork 197
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
Relative links pointing to internal content don't have their extensions rewritten when they contain a fragment #358
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
hey yeh no problem, I use black all the time so "giving back" would be great lol! Have you seen/activated e.g.
well I'm sure @hukkinj1 would be glad to aide you in this, if you haven't already mentioned it yet over in that repo, since he has recently created https://github.com/hukkinj1/mdformat-myst 😄 |
FYI, I've been talking to @ hukkinj1 a lot already so they know of my complaints already lol. Also mdformat-myst doesn't support colon_fence for example, that's the kind of "lack of support" I was talking about I did actually try It works perfectly now, except for one link, although I don't expect it to be fixed. future_style.md [Backslashes are bad and should be never be used](current_style.html#why-no-backslashes) current_style.md <p id="why-no-backslashes">
<em>Black</em> prefers parentheses over backslashes, and will remove backslashes if found.
</p> Now clearly that isn't a header and given that I'm using literal raw HTML, it makes sense that it "breaks". I say "breaks" because the link works just fine but MyST-Parser likes to emit a nice warning about it.
Which is a slight issue since we try to enforce zero-warning builds for our documentation. What's funny is that I like to rant about Black's users not reading the documentation but here am I not reading the documentation properly and opening an unnecessary issue 🙃 🤣 . Thanks anyway, I'll close this since there's nothing actionable for MyST-Parser. |
Regarding the (slightly off-topic 😄 ) mdformat-myst optional syntax support I've made an issue that @ichard26 might be interested having a look at. EDIT: .... and here's the link that dumb me forgot to add 🤦 |
BTW don't worry about this, I fixed this by reading the documentation and using https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing Honestly I've been used to the small basic world of recommonmark, GitHub flavored markdown, plus Sphinx (barely any reST, just toctree and that's like it) that all of these new but very nice additions are a bit overwhelming :D |
well they are all optional, you can always just use |
Describe the bug
Relative links pointing to internal content that contain a fragment don't have their file extension rewritten.
In other words,
[some link](file_two.md#super-duper-important-heading)
isn't rewritten (in MD equivalent) to[some link](file_two.html#super-duper-important-heading)
.It works as expected without the fragment.
I also want to mention this is my first bug report for MyST-Parser. I'm also quite new to MyST-Parser so there's a non-trivial chance I'm missing something really obvious, which in that case, consider this an user support issue. You have my apologies in advance. I did see this issue: #243 but I couldn't find anything to fix my issue.
To Reproduce
Steps to reproduce the behavior:
Download this zip file: myst-bug-maybe.zip and unzip it
Setup a Python environment and run
pip install -r requirements.txt
Build the docs (
make html
and if you're on Windows, I'm sorry, I deleted the make.bat file by accident before making the zip)Take a look at the built docs and visit on the Main file page
Expected behavior
That all three links in
file_one.md
would work.Environment
pip freeze output
Oh and one more thing:
Thank you so much for y'all's work on MyST-Parser! I've been working on rewriting psf/black's documentation and using MyST-Parser has been really nice (well other than the fact I can't use any optional syntax since mdformat doesn't support them yet)
The text was updated successfully, but these errors were encountered: