I’m confused about filtering in docstrings. I know that I can use them in the markdown files of Documenter. But can they be used in regular function docstrings (those embedded in the code)?
One thing that is confusing me is that the semicolon after the jldoctest
in these docstrings has the purpose of removing the julia>
prompt from the docstring (as far as I understand), but at the same time it should separate the options (like the filter) from the keyword.
Thus, is this valid within a Julia codebase?
```#
foo()
# Example
```jldoctest filter = "\\d+" => ""
julia> foo()
0.89798572345
```
```#
foo() = rand()
I’m getting errors I don’t understand, and maybe related to the confusion I’m making about the use of the filters in this context. In particular, doctests sometimes pass or not depending on having or not a semicolon there after the jldoctest;
.