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

links get corrupted when docstrings are copied to multiple places #2042

Open
vtjnash opened this issue Feb 15, 2023 · 2 comments
Open

links get corrupted when docstrings are copied to multiple places #2042

vtjnash opened this issue Feb 15, 2023 · 2 comments

Comments

@vtjnash
Copy link
Contributor

vtjnash commented Feb 15, 2023

In JuliaLang/LinearAlgebra.jl#907, we observe issues where docstrings get copied to places (e.g. Inf and Inf64, or Base./(Any,Any) including a copy of LinearAlgebra./(Array,Array)) causes the links to get "fixed" multiple times, leading them to be broken (or at least for the link checker to complain about them)

Could we make sure the docs content gets copied when inserting, or make the update passes non-mutating, or something?

edit: If we look at something like https://docs.julialang.org/en/v1.10-dev/base/file/#Base.Filesystem.touch, I think it perhaps the case that we may want to try only including a particular string in exactly one "best" place (e.g. FileWatching.Pidfile.LockMonitor's info does not need to be copied here)

@fredrikekre
Copy link
Member

Duplicate of JuliaLang/julia#1079 I think (with JuliaLang/julia#1570 as a draft for a fix). For now one has to ensure each docstring is only included once.

@mortenpi
Copy link
Member

mortenpi commented Mar 28, 2023

I wonder if this particular sub-problem is fixed on master with the change to MarkdownAST? I think we're creating a new DocsNode each time we encounter a docstring, so they shouldn't clash anymore:

docsnode = create_docsnode(docstr, docs, object, page, doc)

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

3 participants