WordPress / browsehappy

101 stars 36 forks source link

Chrome version gone #7

Closed Krinkle closed 11 years ago

Krinkle commented 11 years ago

screen shot 2013-07-26 at 10 50 03 pm

Probably something in those regular expressions stopped working with Wikipedia's current markup.

Krinkle commented 11 years ago

A few days ago, this Wikipedia edit, changed Wikipedia's internal Template:Latest_stable_software_release/Google_Chrome macro to use the display parameter latest_release_version to be invoked twice instead of once.

It seems the intention of the editor was to display the platform versions separately. This also resulted in the display parameter no longer containing a value that was purely numerical, instead it now contained a platform label in front of it.

  {{LSR
  |article = Google Chrome
- |latest_release_version = 28.0.1500.72 
+ |latest_release_version = '''Microsoft Windows'''<br /> 28.0.1500.72 
  |latest_release_date = {{start date and age|2013|07|12}}
  }}
+ {{LSR
+ |article = Google Chrome
+ |latest_release_version = '''Linux''' and '''Mac OS X'''<br />28.0.1500.71 
+ |latest_release_date = {{start date and age|2013|07|09}}
  }}

This broke the logic at functions.php#L101-L115 because the first "word" (separated by whitespace) after = on the line in question, no longer contains any numbers.

I've temporarily "fixed" it by changing the format on Wikipedia back to how it was (revision #565936923; discussion)