Closed shiffman closed 12 years ago
Fixed this issue by looking for //[_____]
and not just [______]
see commit 3da584c for specific regex.
Should the regex /\/\/\[(.*)\]/
include an arbitrary amount of spaces so that // [bold]
or // [bold]
or //[bold]
works?
In ruby would this be:
/\/\/\s*\[(.*)\]/
?
It could. Though in case you wanted to have an inline comment like // [i] refers to the ith element of an array
the "[i]" would get removed. Though
I'm not sure how often that would happen.
If inline comments will only be used for formatting then it's safe to put \s* in there, otherwise requiring the brackets to be directly next to the slashes is preferable (by me, the person who is not writing the book).
On Fri, Aug 10, 2012 at 10:54 AM, Daniel Shiffman notifications@github.comwrote:
Should the regex /\/\/[(.*)]/ include an arbitrary amount of spaces so that // [bold] or // [bold] or //[bold] works?
In ruby would this be:
/\/\/\s[(.)]/
— Reply to this email directly or view it on GitHubhttps://github.com/runemadsen/Magic-Book-Project/issues/139#issuecomment-7646874.
http://skli.se/ @stevenklise
Got it, let's keep it for now and I will have to fix it in the book where there are spaces. Closing this issue and will make a new one in Nature of Code repo to remind me to check for this.
renders as:
i] = 10; //[bold">particles[i] = 10;