-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat(interlinks): filter on py domain by default #254
Conversation
Thanks for this--the multiple matches has been bugging a few different people, so this fix is super helpful! I'm looking back at some notes, and it seems like there might be two moves I missed originally with interlinks.. Ignoring
|
Indeed, for e.g.
Filtering for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks! I left a very small comment, that I think would let us keep using non-python links. If that tweak works, we should be ready to merge!
log.warning already uses log.output, which uses log.dump see https://github.com/pandoc-ext/logging
Thanks again for submitting! In case you're interested in trying it out, I have a PR open to speed up the interlinks filter, by having it just read raw inventory files :) #253. |
Types such as
dict
andlist
in the python standard library appear multiple times in the inventory. For example, fordict
, there is the standard library https://docs.python.org/3.10/library/stdtypes.html#dict (the one we want), but also more obscure matches like https://docs.python.org/3.10/library/2to3.html?highlight=dict#to3fixer-dict.Luckily, the
stdtypes
matches come up first. There is no guaranty for this, but I think it is fine to still link the first match and log a warning instead of not linking them.While I was at it, I also made the module local functions local, renamed the
inventory
variable in the for loop to not shadow the globalinventory
and replaced deprecatedquarto.utils
functions with the appropriatequarto.log
functions (had to get rid of those squiggly lines).