Skip to main content
3 of 3
Commonmark migration

Numbers

Change the lexer such that leading 0 is not part of a number:

# current behaviour
01     # -> 1

# new
01     # -> 0 1

Also negative numbers should be written with _ instead:

# current behaviour
1 2-3   # -> -1 3

# new
1 2_3     # -> 1 2 -3
Howard
  • 23.6k
  • 2
  • 44
  • 83