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

Make a function acceptable for :skip_code_autolink_to option #1878

Merged

Conversation

irisTa56
Copy link
Contributor

Currently, the :skip_code_autolink_to option only accepts a list.
This approach becomes impractical when dealing with a large number of terms.

For example, I'm working on a project where some hidden modules are automatically defined, and some documentation tries to link to those modules (to be precise, types defined in those modules).
My problem there is that the number of those terms is too many to list in :skip_code_autolink_to option.

So it is useful if :skip_code_autolink_to option accepts regular expressions or, more flexibly, a function.
I choose the function approach as it aligns with the discussion in #1759 (comment).
(I'm pleased to implement the same feature for :skip_undefined_reference_warnings_on option if this PR is approved.)

As a caveat, because ExDoc.Autolink is internal (@moduledoc false), I just removed code that expects a list for the skip_code_autolink_to field.
Should I keep backward compatibility at ExDoc.Autolink level too?

@irisTa56 irisTa56 marked this pull request as ready for review March 10, 2024 08:54
@josevalim josevalim merged commit a9de3e6 into elixir-lang:main Mar 10, 2024
4 checks passed
@josevalim
Copy link
Member

Adding similar to skip_undefined_reference_warnings_on will be welcome!

@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants