-
Notifications
You must be signed in to change notification settings - Fork 481
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
Doctest filter matches line by line by default #1679
Comments
I think the issue is that the
So in the end the strings that get compared have a different number of newlines, and so don't match. It does feel like a bug.. I think the filtering should probably be maximally greedy. |
You can use the
|
Just confirming that '''jldoctest; filter = r".*"s
[1,2]
# output
3
''' works. Thanks a lot! |
Although maybe I was too fast. But the continuation problem might be separate, so created a new issue: https://github.com/JuliaDocs/Documenter.jl/issues/new |
I'll re-open this to leave it as a documentation issue -- we should mention in the docs that the filtering happens line by line. |
I am trying to get the regex filter function to work for a simple doctest (with the goal of creating a filter which checks whenever there was an error or not).
Checking from here #452, it seems that
filter = r".*"
should create something which accepts any output. So I try:(in all code blocks I will use ' to denote those things which create code in markdown, so to avoid messing up the formatting).
and
which both works.
However, if I try anything a little bit complicated, it fails, e.g.
however, if it is a bit more similar, it does work:
I also tried modifying the regex for multiple lines, e.g.
filter = r"\_.\{-}"
. Not sure whenever that is needed/correct though (in either case, didn't work)The text was updated successfully, but these errors were encountered: