note right
if
:
fork
end note
The if, fork, and other words which are activity keywords should not cause indentation when inside text like a note.
This could be solved with a similar approach to the checkDiagramType function, skipping lines that are in these text blocks.