The markdown version I use is of pandoc. The indentation is needed in this example for making the code block be a part of list item.
BTW Geany highlighting seems to work correctly only when indentation is 0 or 1 space. When there are 2 or 3 spaces, it causes the same behavior as in case of 4 spaces.