Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Unmatched quotes issue (Read 2786 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Unmatched quotes issue
Mar 5th, 2015 at 7:08pm
Mark & QuoteQuote  
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
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Unmatched quotes issue
Reply #1 - Mar 5th, 2015 at 8:35pm
Mark & QuoteQuote  
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
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Unmatched quotes issue
Reply #2 - Mar 5th, 2015 at 10:57pm
Mark & QuoteQuote  
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
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Unmatched quotes issue
Reply #3 - Mar 5th, 2015 at 11:17pm
Mark & QuoteQuote  
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
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Unmatched quotes issue
Reply #4 - Mar 6th, 2015 at 12:59am
Mark & QuoteQuote  
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
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Unmatched quotes issue
Reply #5 - Mar 6th, 2015 at 1:42am
Mark & QuoteQuote  
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
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Unmatched quotes issue

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry