[Issue 3554] Ddoc generats invalid output for documentation comments with non paired paranthasis
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 25 01:04:48 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554
Johannes Pfau <johannespfau at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |johannespfau at gmail.com
--- Comment #1 from Johannes Pfau <johannespfau at gmail.com> 2010-07-25 01:04:43 PDT ---
This requires dmd to escape parenthesis in the doc comments.
It seems like in doc.c, Section::write is the place to look at. There's already
an loop in that function replacing _ with spaces. That could be extended to
also replace ( and ) with some escape sequence. Maybe something like \( and \)
and the escape character then needs to be escaped [\\] as well. However, this
could get a little complicated, because sections can call macros and those
macro calls should get escaped.
Then in macro.c the code scanning for parenthesis must be aware of this
escaping.
I think this would mean adding a case for the escape character to the switch
block in extractArgN and skipping over the escape sequence.
The last step is to remove the escape characters in doc.c, Module::gendocfile.
There's already code to do that for the 0xFF escape character. That could
either be extended for another escape character, or we could just use 0xFF as
the escape sequence.
Maybe the best solution is to just escape parenthesis manually in the source
file. I don't know if this is possible though, and it's definitely not
documented.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list