loubnabnl HF staff commited on
Commit
e4c83c2
1 Parent(s): 66a3725

fix syntax highlighting

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -79,4 +79,7 @@ st.markdown(
79
 
80
  # display file content
81
  st.markdown("#### File content:")
82
- st.code(example["content"], language=chosen_language)
 
 
 
 
79
 
80
  # display file content
81
  st.markdown("#### File content:")
82
+ if not example["lexable"]:
83
+ st.write(f"File can't be lexed so we remove syntax highlighting.\nContent:\n {example['content']}")
84
+ else:
85
+ st.code(example["content"], language=chosen_language)