Return XPath integers as actual integers.
This is to ensure that calls such as string(10) return "10" and not "10.0". It also saves integer -> float conversions when they're not needed.
This commit is contained in:
1 parent
b316fd3e1c
commit
431a253000
3 files changed
+4
-4
No files matched your search
@@ -794,7 +794,7 @@ module Oga
|
||||
# @return [Float]
|
||||
#
|
||||
def on_int(ast_node, context)
|
||||
return ast_node.children[0].to_f
|
||||
return ast_node.children[0]
|
||||
end
|
||||
|
||||
##
|
||||
|
||||
Reference in new issue
Block a user