How can I handle smart truncation when using Pandoc

18 views Asked by At

For example, say I want to convert some Markdown to Jira markup

$ pandoc - -f markdown -t jira <<< "Here is [a link](https://www.example.com)"
Here is [a link|https://www.example.com]

That looks good, but say I only have a 14 character limit. Ideally, I'd only like the output of the conversion to be: Here is.

Does Pandoc know how to split the text so that it's not in the middle of a link, or some other special markup? Or am I limited to finding the right truncation heuristics for the specific output format I'm working with?

Also worth noting that I'm using pypandoc for this, in case that helps.

0

There are 0 answers