Yes, the mode for code blocks works differently than other modes. I even don't like that but also I didn't found a way to make it better. It is the only mode that is nested into another mode (the Scaladoc mode) and can only be reached when the outer mode is accepted before.