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 1201ProgramAlarm for Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter

$
0
0

I noticed that on this question the syntax highlighting for some C++ code stops partway thru.

In particular, it gets tripped up by this bit of code:

template <class T>ostream& operator<< (ostream& os, const skg::Triplet<T>& p_t) ;void other_stuff_that_isnt_colored();

If the operator is changed from << to something else, the coloring continues

template <class T>ostream& operator+(ostream& os, const skg::Triplet<T>& p_t) ;void other_stuff_that_is_colored();

but the color for the operator keyword is the identifier color, and not the keyword color.

If the template <class T> part is removed the coloring is correct.

ostream& operator<< (ostream& os, const skg::Triplet<T>& p_t) ;void other_stuff_that_is_colored();

Viewing all articles
Browse latest Browse all 39

Trending Articles