C++ markdown syntax highlighting doesn't work


C++ markdown syntax highlighting doesn’t work and i don’t understand why

Hi @CostyRo, welcome to the Streamlit community!

What about st.code?

https://docs.streamlit.io/en/stable/api.html#streamlit.code

I’d try 'cpp' as the language argument.

Best,
Randy

same result, i tried to use “cpp” as argument in markdown and in st.code as well

This seems to work for me (ignoring the fact that C and C++ aren’t quite the same language)

import streamlit as st

code = '''
#include <iostream>

using namespace std; 

int main() 
{
  cout << "Hello World!";
}
'''

st.code(code, language = 'c')

Best,
Randy

it works for me too when i try “c”, but i want c++ syntax