rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

C++ lexer shows function closing curly brackets in red #1986

Open oliora opened 11 months ago

oliora commented 11 months ago

Name of the lexer cpp

Code sample A sample of the code that produces the bug.

template <std::size_t Alignment>
inline __attribute__((always_inline)) const char* alignedAfter(const char* ptr) noexcept {
    auto offset = reinterpret_cast<std::uintptr_t>(ptr) & (Alignment - 1);
    return offset ? (ptr + Alignment - offset) : ptr;
}

Additional context

Check the closing bracket in red. The CSS class of it is err.

image