Quantcast
Channel: Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter - Meta Stack Exchange
Viewing all articles
Browse latest Browse all 39

Answer by Dingus for Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter

$
0
0

Ruby numeric literals are not highlighted as expected

In Ruby, float, rational, and complex literals render like so:

3.5e42r6i

The expected behaviour is for the entire literal to be highlighted. For comparison, here are the same float and complex literals with Python highlighting:

3.5e46j

(Python uses j instead of i for the imaginary unit and doesn't share Ruby's literal syntax for rationals.)

Is it possibly an upstream issue?


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>