Parse custom syntax block support?
-
Hi there,
I was wondering if there was a good way to pass this plugin an option to parse additional, custom markdown to render a specific markup?
Below is an example with an arbitrary syntax (which might be terrible, just bear with me).
Say I want to create afigure
block with afigcaption
, and I come up with this custom syntax:
{[Some alt text](https://example.com/image.jpg)[A good image caption]}
… that would get converted into this:
<figure><img src="https://example.com/image.jpg" alt="Some alt text"><figcaption>A good image caption</figcaption></figure>
Would this plugin be able to accommodate for this, and if so, how would I implement that conversion? (I would create a small custom plugin to run a regular expression on the content and convert it, of course, I just wonder if there is a filter I can hook into)
Thank you!
Best,
ChrisPS: I know I could pass in the final HTML directly, but that is less convenient, and harder to scan.
- The topic ‘Parse custom syntax block support?’ is closed to new replies.