linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [410] Better string matching for the code in r4


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [410] Better string matching for the code in r405.
Date: Sun, 28 Jul 2013 11:39:10 +0000

Revision: 410
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=410
Author:   valkov
Date:     2013-07-28 11:39:10 +0000 (Sun, 28 Jul 2013)
Log Message:
-----------
Better string matching for the code in r405. The old code might crash for some 
strings for unknown reason.

Revision Links:
--------------
    http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=405

Modified Paths:
--------------
    trunk/src/lm_compute_preferred_hd_link.js

Modified: trunk/src/lm_compute_preferred_hd_link.js
===================================================================
--- trunk/src/lm_compute_preferred_hd_link.js   2013-07-22 20:55:13 UTC (rev 
409)
+++ trunk/src/lm_compute_preferred_hd_link.js   2013-07-28 11:39:10 UTC (rev 
410)
@@ -70,12 +70,12 @@
        var hd_index = -1;
        for (var i=0,l=hd_links.length; i<l; i++)
        {
-           if (hd_links[i].label.match(width_re))
+           if (width_re.test(hd_links[i].label))
            {
                hd_index = hd_links.length - i;
            }
 
-           if (hd_links[i].label.match(width_format_re))
+           if (width_format_re.test(hd_links[i].label))
            {
                hd_index = hd_links.length - i;
                break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]