Open osheari1 opened 2 months ago
Sorry for the delay in getting to this.
It looks like it's working correctly then? By default gptel will leave all text inside src blocks untransformed when converting from Markdown to Org. Messing with this introduces all kinds of edge cases. The best way to handle this is to get the LLM to produce correctly formatted blocks, as you do.
No worries :smile:
Agreed. I suppose I was thinking more along the lines of making it more obvious to users what they would need to do in this scenario, as it took me a while to figure out.
Maybe we could add a record in the FAQ about how to handle miss-formatted org-mode source blocks? (I'd be happy to do it)
Maybe we could add a record in the FAQ about how to handle miss-formatted org-mode source blocks?
Sounds good! Documentation PR is welcome.
With org-mode source blocks in org-mode buffers, the content of the source block must be escaped, otherwise it breaks parsing. For example
However if you update the prompt to ensure all source blocks escape headers, then it won't break the parsing.