federicotdn / verb

Organize and send HTTP requests from Emacs
https://melpa.org/#/verb
GNU General Public License v3.0
540 stars 20 forks source link

Support syntax highlighting in org babel block #32

Closed davidshen84 closed 3 years ago

davidshen84 commented 3 years ago

In normal org block, with no indentation, the syntax highlighting works well. But when the content is indented, all highlighting are removed

For example, the block below does not have syntax highlighting in org-mode. But if you remove the indentation, the highlighting works fine.

**** ex
     #+begin_src verb
     get https://reqbin.com/echo/get/json

     #+end_src

     #+RESULTS:
     #+begin_example
     HTTP/1.1 200 OK
     Date: Wed, 20 Jan 2021 05:23:00 GMT
     Content-Type: application/json
     Content-Length: 19
     Connection: keep-alive
     Cache-Control: max-age=31536000
     CF-Cache-Status: HIT
     Age: 1452
     Accept-Ranges: bytes
     cf-request-id: 07bfd816c00000fd1e18bce000000001
     Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
     Report-To: {"max_age":604800,"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=yxb9PT90yNoum90vYgMK726EQExPuN%2Byb7Gx8ebIMur%2Beouwnz4cOG3RWatTZ9Ebm7GK05po5UCF0B9diNVjBVSJdSnFkY0S1YjRqZHM7q1aiJk8xd1z"}],"group":"cf-nel"}
     NEL: {"max_age":604800,"report_to":"cf-nel"}
     Vary: Accept-Encoding
     Server: cloudflare
     CF-RAY: 61465c6acb51fd1e-SYD

     {
       "success": "true"
     }
     #+end_example
federicotdn commented 3 years ago

Fixed on https://github.com/federicotdn/verb/commit/45897e0ede8168b5b52930232757dc014c11a498