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

Document that doctest filters match line-by-line #1720

Merged
merged 3 commits into from
Jan 25, 2022

Conversation

odow
Copy link
Collaborator

@odow odow commented Oct 24, 2021

Closes #1679

@@ -300,6 +300,12 @@ DocTestFilters = nothing
The `DocTestFilters = nothing` is not strictly necessary, but good practice nonetheless to
help avoid unintentional filtering in following doctest blocks.

!!! info
Filters are applied line-by-line to the output. To match multiline strings,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not line-by-line, the problem in the linked issue is just that . doesn't match newline characters. Perhaps reword to something like:

The filter match is replaced with an empty string in both the expected and actual output using
`replace`, e.g. `replace(str, filter => "")`. Note that this means that the same filter can match
multiple times, and if you need the same filter to match multiple lines your regex need to account
for that.

@fredrikekre fredrikekre merged commit a34880b into JuliaDocs:master Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doctest filter matches line by line by default
3 participants