Closed Bug 782930 Opened 9 years ago Closed 9 years ago

Kuma: KumaScript - Numbers with decimals are getting trimmed to just the part before the decimal

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheppy, Unassigned)

References

()

Details

Passing numbers to KumaScript without quotes was fixed at one point but has broken. If you pass a number, such as 1.8, unquoted, you only get "1" in the output. See {{js_minversion_header(1.8)}} for example.

This is breaking a lot of docs ("Changed in JavaScript 1" is not useful!) and needs to be fixed right away.
Do you have an example page where this is happening & can you paste that in the URL field?
Yeah, let me make you one. I don't have one off the top of my head. Try this one:

https://developer.mozilla.org/en-US/docs/User:Sheppy/BadNumberTest
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/4b638227db5ad1ce4666c76d90dab327ba959364
fix bug 782930: Kumascript update; don't use parseInt() to parse numeric arguments

https://github.com/mozilla/kuma/commit/ae2c39f11753496b71882f5782265cae047af66c
Merge pull request #514 from lmorchard/no-trimmed-decimals-782930

fix bug 782930: Kumascript update; don't use parseInt() to parse numeric arguments
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Component: Website → Landing pages
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.