blackfriday icon indicating copy to clipboard operation
blackfriday copied to clipboard

How to preprocess a tag?

Open GildedHonour opened this issue 5 years ago • 1 comments

Say, I have a text and in it there's "img"

How can I preprocess it such that I could replace its attributes, for instance, url? It could be anything else, such as alt text, title.... And not only for "img"

Before:

   `![alt text](domain.com/dri1/dir2/image1.png "this is my picture")`

After, but before html:

  `![alt text](another_domain.com/another_dir/image1.png "this is my picture")`

In a convinient way, not merely via Regexp.

Possible?

GildedHonour avatar Dec 31 '18 14:12 GildedHonour

I've made a custom markdownToPdf Parser https://github.com/devarsh/miniApps/blob/master/template/mdToPdf/mdToPdfParser.go#L232 Perhaps this can help

devarsh avatar Jun 19 '19 07:06 devarsh