Possible to override some markup parsing?
Closed this issue · 1 comments
tomconroy commented
I'd like to override how Textile parses (for example) an image tag—i.e. in my rails app, I'd want to put in the reference to an Image object in my database, and then fetch the actual URL when it parses the markup.
!image_id!
def parse_img(text)
Image.find(text).url
end
Is this very hard to add in?
brianjlandau commented
Is this still something you need? And yes I think this would be hard to add. We don't actually process the markup we offload that to other gems that are purpose build for handling that (in this case RedCloth). So it would require extending those markup processors to handle this, which seems out of scope for this gem. I'm going to close this, but feel free to reopen if you have thoughts for how we could address this.