--- Comment #3 from Johannes Pfau <> 2010-08-17 03:37:48 
PDT ---
Created an attachment (id=720)
proposed patch

This patch fixes all occurrences of stray parenthesis which could be produced
by the user. This includes comment section bodies and headers. Basically with
this patch the user cannot break the ddoc output anymore. I emphasize 'user'
because the compiler can still break it. std.random shows one of these
examples: A function with an string default argument like this : = "(}". This
will still break the documentation output, but that's another issue and I'll
provide a fix for that soon.

What the path does is:
1. If there's a stray ( or ) in the comments, replace it with $(LPAREN ) /
2. If the user has warnings enabled, emit a warning about the stray
parenthesis. The loc is set to the corresponding dsymbol location. More
detailed line information is not possible, because the parser does not pass
this info to the DocComment structure.

Note that automatically replacing the stray parenthesis is not the ultimate
solution, it just limits damage to the current section. For example:
"$(Test ) )" becomes  "$(Test ) $(LPAREN )" but you might want "$(Test $(LPAREN
) )". The compiler cannot know this. Therefore parenthesis should be escaped
manually if one needs stray parenthesis.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to