Bug 7715 – DDoc eats $1, $2, $3 etc. inside d_code section

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-15T08:57:00Z
Last change time
2013-07-07T09:13:43Z
Keywords
ddoc, pull
Assigned to
andrej.mitrovich
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2012-03-15T08:57:06Z
Example: /** &#36;1 &#36;2 --- string s = "$1$2 $ &#36;4"; --- */ void foo(){} Produces this (note that a lone $ was keept intact and &#36; doesn't work inside pre block): <html><head> <META http-equiv="content-type" content="text/html; charset=utf-8"> <title>test</title> </head><body> <h1>test</h1> <!-- Generated by Ddoc from test.d --> <br><br> <dl><dt><big>void <u>foo</u>(); </big></dt> <dd>&#36;1 &#36;2 <pre class="d_code">string s = <font color=red>" $ &amp;#36;4"</font>; </pre> <br><br> </dd> </dl> <hr><small>Page generated by <a href="http://www.digitalmars.com/d/2.0/ddoc.html">Ddoc</a>. </small> </body></html> Marking as critical because it destroys the replace format string in regex article. But maybe, just maybe, I'm missing something.
Comment #1 by dmitry.olsh — 2012-03-15T09:37:19Z
As there is a workaround via macro: DOLLAR = $ I'm lowering importance, but the point is that I for one expect any D code inside --- ... --- to be protected from whatever macroses/DDoc specifics.
Comment #2 by andrej.mitrovich — 2012-12-02T08:58:39Z
Comment #3 by github-bugzilla — 2012-12-06T00:42:49Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ab5258d5bcedc55dbfeeb0fb4cc4d283f184c7fd Merge pull request #1244 from AndrejMitrovic/Fix7656 [ddoc] Issue 7656 and 7715 - ddoc must escape special characters
Comment #4 by dmitry.olsh — 2012-12-06T07:23:42Z
Thanks a bunch!
Comment #5 by andrej.mitrovich — 2013-01-22T11:45:13Z
Sorry, it was reverted due to a regression (https://github.com/D-Programming-Language/dmd/pull/1244#issuecomment-11162068). Will work on it again soon.
Comment #6 by k.hara.pg — 2013-07-01T18:11:43Z
(In reply to comment #5) > Sorry, it was reverted due to a regression > (https://github.com/D-Programming-Language/dmd/pull/1244#issuecomment-11162068). > Will work on it again soon. New pull request: https://github.com/D-Programming-Language/dmd/pull/2287
Comment #7 by github-bugzilla — 2013-07-07T08:24:04Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b2a3ea72fd9f60cac38ba6008e139982649360ff fix Issue 7715 - DDoc eats $1, $2, $3 etc. inside d_code section