There might be some things that could be done differently, but this pretty much shows where it breaks syntax highlighting and what can be fixed without actually breaking perl syntax.
Posted by: Dandello Posted on: Mar 5th, 2015 at 11:17pm
instead of literal #, I presume we should use \x23, but that makes HTML entities look unreadable.
That's one of the issues with working with a frame work that combines 3 languages - there are characters that mean different things in each language - one of them is #.
Posted by: Monni Posted on: Mar 5th, 2015 at 10:57pm
Actually, in the language files we should be using q~ ~; and qq~ ~; to avoid the escaped quotes. Same in the main line code. (q~ ~; is non-interpolated and qq~ ~; is interpolated. YaBB uses the tildes in stead of curly brackets because it uses curly brackets to mark the template replacement sections.
But a diff would be good so we can get it all cleaned up.
While I was making the diff, I also noticed that literal # is used outside comment declarations... instead of literal #, I presume we should use \x23, but that makes HTML entities look unreadable.
Posted by: Dandello Posted on: Mar 5th, 2015 at 8:35pm
Actually, in the language files we should be using q~ ~; and qq~ ~; to avoid the escaped quotes. Same in the main line code. (q~ ~; is non-interpolated and qq~ ~; is interpolated. YaBB uses the tildes in stead of curly brackets because it uses curly brackets to mark the template replacement sections.
But a diff would be good so we can get it all cleaned up.
Posted by: Monni Posted on: Mar 5th, 2015 at 7:08pm
Not so much a bug, but styling glitch...
There is a lot of unmatched single and double quotes that make code full of ugly hacks...
Instead of using
\" or '"' or unbalanced " -- we should use \x22 \' or "'" or unbalanced ' -- we should use \x27
This should also make syntax checkers happy
There was also some cases where quotes were unbalanced because variable inside the quotes was not evaluated beforehand and used ?: instead.
I'm going to make a diff when I get the code cleaned up...