If you have an header with just the language and no spaces or other arguments, like #+begin_src python, when point is inside a polymode managed buffer (so a src block) org parses the language wrongly, it includes the subsequent line...the regex used by org to parse the language uses \S so any includes non white-space...and indeed \n is not a whitespace..but why does it happen only inside polymode? Parsing the point is at the header line works fine...
My current workaround is to just append a space to the end of the line if there isn't one
If you have an header with just the language and no spaces or other arguments, like
#+begin_src python, when point is inside a polymode managed buffer (so a src block) org parses the language wrongly, it includes the subsequent line...the regex used by org to parse the language uses\Sso any includes non white-space...and indeed\nis not a whitespace..but why does it happen only inside polymode? Parsing the point is at the header line works fine...My current workaround is to just append a space to the end of the line if there isn't one