Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Unmatched quotes issue (Read 3720 times)
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Unmatched quotes issue
Reply #5 - Mar 6th, 2015 at 1:42am
Print Post  
I'll check it out in the morning - when I'm not so tired I can't see straight.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Unmatched quotes issue
Reply #4 - Mar 6th, 2015 at 12:59am
Print Post  
http://pastebin.com/X9391iyH

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.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Unmatched quotes issue
Reply #3 - Mar 5th, 2015 at 11:17pm
Print Post  
Monni wrote on Mar 5th, 2015 at 10:57pm:
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 #.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Unmatched quotes issue
Reply #2 - Mar 5th, 2015 at 10:57pm
Print Post  
Dandello wrote 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.


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.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Unmatched quotes issue
Reply #1 - Mar 5th, 2015 at 8:35pm
Print Post  
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.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Unmatched quotes issue
Mar 5th, 2015 at 7:08pm
Print Post  
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...
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint