tanhakabir / rest-book

REST Book is a Visual Studio Code extension that allows you to perform REST calls in a Notebook interface.
https://marketplace.visualstudio.com/items?itemName=tanhakabir.rest-book
MIT License
249 stars 24 forks source link

New line before header causes content to silently be part of the body #117

Open connor4312 opened 3 years ago

connor4312 commented 3 years ago

Having a request like

POST https://example.com
Foo: bar

{"hello": "world"}

works, but

POST https://example.com

Foo: bar

{"hello": "world"}

will cause the header to be part of the body, even though the syntax highlighting makes it look like the headers will be handled as headers

tanhakabir commented 3 years ago

Hmm, so I'm parsing it in such a way that all headers have to be the subsequent line so I can properly demarcate where the body starts. Do you think that's unnecessary or do you think there's a better way to set my grammars for syntax highlighting to look out for line breaks?