ShaneCunn / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

Problem when firstLine is negative #88

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use a negative value for firstLine

What is the expected output? What do you see instead?
li elements should start with your negative value,
instead it uses the default value (1) because the regex used to extract
firstLine doesn't support negative value

What version of the product are you using? On what operating system?
v1.5.1

Please provide any additional information below.
you can solve the problem by replacing :
  var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi');
by 
  var regex = new RegExp('^' + name + '\\[(-?\\w+)\\]$', 'gi');

at the beginning of the GetOptionValue function

Original issue reported on code.google.com by romain.f...@gmail.com on 15 Jul 2008 at 6:56