Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

False positive warnings? #291

Closed
ddnexus opened this issue Mar 11, 2022 · 10 comments
Closed

False positive warnings? #291

ddnexus opened this issue Mar 11, 2022 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ddnexus
Copy link

ddnexus commented Mar 11, 2022

Editing one file (how-to.md) that contains quite a lot of links, I get a long list of warnings like:

WARNING: [api/javascript.md:179] Consider revising URL "../../how-to/#maximize-performance" to a proper input path.
WARNING: [api/pagy.md:113] Consider revising URL "../../how-to/#control-the-page-links" to a proper input path.

I am not sure what "Consider revising URL" means, since the indicated lines in my files are not including the ../../ prefix in the link-path.

Is retype trying to suggest me that I should prefix them with ../../? That would be wrong because the files containing the links and the target are siblings in the same dir. The links work well as they are now, and changing would actually break the links.

Could you clarify what that means?

@geoffreymcgill
Copy link
Collaborator

The unresolved links look like they are happening in the api/javascript.md (line 179) and api/pagy.md (line 113) pages, not how-to.md.

Is this the repo and branch you are using?
https://github.com/ddnexus/pagy/tree/retype/docs

You could try pointing to the .md directly, such as "../how-to.md#maximize-performance" instead of "../../how-to/#maximize-performance".

Hope this helps.

@geoffreymcgill geoffreymcgill self-assigned this Mar 11, 2022
@ddnexus
Copy link
Author

ddnexus commented Mar 11, 2022

Yes, indeed the warning is generated by the files that point to how-to.md (a lot of them, not only that 2). And yes the links in the files are already in the form of how-to.md.

The odd thing is that the warnings report a path with ../../ and without .md, while the files have a regular relative path to the file, so that is coming from somewhere else than the paths in the files.

So is the warning supposed to offer a suggested change, or is it reporting a wrong path at that line?

Both would be wrong, so it looks like a bug to me. What do you think?

@ddnexus
Copy link
Author

ddnexus commented Mar 11, 2022

BTW, the files are in the same dir so the relative path should not have any .. in it.

@geoffreymcgill
Copy link
Collaborator

Can you link us to a repo and branches with these pages? We would really prefer to us the exact same files so that we know for sure that we are testing the same thing.

@ddnexus
Copy link
Author

ddnexus commented Mar 11, 2022

Sure, that's better. For brevity I omitted most of the warnings, and while I was showing a couple of examples, I was actually referring to others, hence the confusion. Sorry.

Please, checkout the branch retype. Cd into docs and retype watch.

First there are a few legit warnings about Unresolved image URL "none". That's because I was trying to omit the automatic inclusion of the first image in the page (when generating the category). What is the official way to avoid the automatic image inclusion in the category descriptions?

Back to the original problem: please, open the how-to.md file, make any change and save it. You will see the list of warnings. They all have some problem with the levels of the dirs. If you follow the files/lines of the warning you will see that the path has nothing to do with the one reported in the warnings. Besides the paths in the files work in the browser, so I don't understand the warnings.

@ddnexus
Copy link
Author

ddnexus commented Mar 11, 2022

I've found a clue.

For some reason the many warnings are down to a few now (after saving twice the how-to.md), so it looks like some weird problem.

The few that are still there have an italic wrapping the link, like in the following example:

_(see [link](path))_

While that should be a legit usage of markdown, it looks like it somehow messes up the retype parser/code.
Removing the italic seems to suppress the warning.

@geoffreymcgill
Copy link
Collaborator

Interesting. We will dig into this and try to figure out what's going wrong.

@geoffreymcgill
Copy link
Collaborator

Yep, there is something strange going on. We have reproduced the issue and have begun our investigation. There's something about those italic underscores _ that Retype does not like.

@geoffreymcgill geoffreymcgill added the bug Something isn't working label Mar 12, 2022
@geoffreymcgill geoffreymcgill added this to the v2.0 milestone Mar 12, 2022
@geoffreymcgill
Copy link
Collaborator

okay, looks like we have this one fixed. No related WARNINGS are generated in your project now.

The fix will be included in the next Retype release, which will likely be v2.0.0 final early this coming week.

Thanks for letting us know about this issue. It was certainly an interesting and challenging problem.

@ddnexus
Copy link
Author

ddnexus commented Mar 12, 2022

Thank you for the quick action!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants