Open GoogleCodeExporter opened 9 years ago
Regarding delimited comments, I think the below change would do the trick (NB: I've not read up on Prettify yet; just copied the pattern which Evan had used for multi-line strings).
Demo here: https://codepen.io/JohnLBevan/pen/ZyeOZO
Code below.
[
// Whitespace.
[PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// A delimited comment
//[PR['PR_COMMENT'], /^\x3C#[^\r\n]*#>\b/, null],
// A line comment that starts with #
[PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'],
['opn', /<#[^(?:#>)]+/, null, '<#'],
['clo', /<#[^(?:#>)]+#>/, null, '#>'],
// A double quoted, possibly multi-line, string.
[PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'],
['opn', /^\(+/, null, '('],
['clo', /^\)+/, null, ')'],
],
Original issue reported on code.google.com by
blackmag...@gmail.com
on 10 Jul 2013 at 8:33Attachments: