What steps will reproduce the problem? 1. Define a set of strings as default values for PHP class variables. 2. Remove input focus from the code field.
What is the expected output? What do you see instead? See attached screenshot showing both expected output and actual output.
What version of the product are you using? On what operating system? XP SP2, whatever Snippely version is available.
Please provide any additional information below. Seems to happen in other places as well. This is probably a bug in whatever syntax highlighting library you are using, I doubt you wrote your own. If you let me know what library that is I can report this bug there, or you guys can report it, or whatever lol.
- snippely_bug.JPG 208.28KB
Comment #1
Posted on Mar 31, 2008 by Happy Monkey"I doubt you wrote your own."
actually, Valerio did write it himself ;), though it is based on dp.SyntaxHighlighter. (http://googlecode.com/p/syntaxhighlighter)
the bug is in the regexp we are using for double quoted strings... thanks for the report, we're looking into a fix.
Comment #2
Posted on Apr 10, 2008 by Massive PandaThe problem is not just PHP. To fix it change the RegExp in highlighter.js line 136 to:
doubleQuotedString: (/"(?:.|(\\\")|[^\""\n])*"/g),
Comment #3
Posted on Apr 10, 2008 by Massive PandaBy the way, is anyone maintaining snippely? It has the potential to be an awesome tool for devs of all kinds.
If someone is, here is the start of C# highlighter:
Brushes.CSharp = {
'comment': [Highlighter.RegExps.singleLineComment,
Highlighter.RegExps.multiLineComment],
'string': [Highlighter.RegExps.singleQuotedString,
Highlighter.RegExps.doubleQuotedString],
'integer': Highlighter.RegExps.integer,
'preprocessor': Highlighter.RegExps.preprocessor,
'special': (/\$\w+/g),
'keyword': 'abstract as base bool break byte case catch char checked class const ' +
'continue decimal default delegate do double else enum event explicit ' +
'extern false finally fixed float for foreach get goto if implicit in int ' +
'interface internal is lock long namespace new null object operator out ' +
'override params private protected public readonly ref return sbyte sealed set ' +
'short sizeof stackalloc static string struct switch this throw true try ' +
'typeof uint ulong unchecked unsafe ushort using virtual void while'
};
Comment #4
Posted on May 21, 2008 by Happy Monkeyfixed in r132
Status: Fixed
Labels:
Type-Defect
Priority-Medium