The color is added depending on the language. You can check whether Swift is added in the highlighted_languages and if detection still does not work, you can also manually set the language for a code block.
Moin
2
נושאים קשורים
| נושא | תגובות | צפיות | פעילות | |
|---|---|---|---|---|
| Add new highlightjs languages | 2 | 127 | 13 במאי, 2025 | |
| HighlightJS is auto-selecting wrong language | 6 | 1152 | 18 במרץ, 2020 | |
| Configure which programming languages are available for syntax highlighting | 6 | 2624 | 26 באוגוסט, 2024 | |
| Choosing code highlight styles | 5 | 1260 | 8 בינואר, 2019 | |
| Be sure to get user input on which language the preformatted text is | 2 | 334 | 23 במרץ, 2024 |