I have a particular case where I would like to include some text in square brackets followed by a parenthetical statement within a custom type’s docstring. Something along the lines of:
"""
foo
# Fields:
- `bar`: explanation [units] (parenthetical text)
- `baz`: explanation [[units]] (parenthetical text)
"""
struct foo
bar
baz
end
If I run the above code, the docstring parser will drop the square brackets and for bar
and keep only one set of them for baz
(the latter is the intended output behavior). If I try to escape the square brackets with a backslash instead, there is a parsing error, so the only solution I could think of to get to work was the double square brackets. However, if I now auto-generate docs with Documentor.jl, I get a warning message in terminal and see that the HTML docs interpret the square bracket followed by round brackets with an attempted hyperlink. How do I get the fields to show up the way I intend both in the REPL help text and in Documentor.jl? (Or is this a bug I should file?)