Write the following in Geany
* Item 1
* My code block will go after this line break
```sql
CREATE EVENT SESSION query_performance ON SERVER
ADD EVENT sqlserver.sql_statement_completed(
```
* Item 3
and set the filetype to Markdown

you will then notice that the syntax highlighting is correct.
Now, indent the last line by four spaces, as I believe is the proper way to indent a code block in markdown.
* Item 1
* My code block will go after this line break
```sql
CREATE EVENT SESSION query_performance ON SERVER
ADD EVENT sqlserver.sql_statement_completed(
```
* Item 3
and then the syntax highlighting becomes incorrect. The rest of the document becomes highlighted as if it is part of the code block.
My question are as follows:
- Is what I have done considered a correct way to indent a code block?
- How can I prevent Geany from producing this incorrect syntax highlighting?


This will be fixed in the upcoming version (1.39 or 2.0). Though there is no release date set yet.
This was already reported in the Geany bug tracker at https://github.com/geany/geany/issues/2797 and it was fixed in the Scintilla library, reported at https://sourceforge.net/p/scintilla/bugs/2247.
The current GIT master already has a newer Scintilla version with the fix included. You could install the current GIT version yourself, see https://www.geany.org/manual/current/index.html#source-compilation for details.