Repositories
- https://github.com/blocker-solutions/markdown-it-mixed-html-fix
- https://github.com/blocker-solutions/markdown-it-image-proxy
New Projects
Both Mixed-HTML-Fix & Image-Proxy are plugins for Markdown-It, focusing on easy rendering Steem related content (but still good for general usage)
What is the project about?
Package: @blocker/markdown-it-mixed-html-fix
This package is a simple parsing fix to allow mixed HTML to live well with Markdown links and images.
For example:
<some-tag>foo-bar</some-tag>

This syntax, while used by many authors is currently rendering the links as plain text, unless this fixer-plugin is used.
Related discussions about this: https://github.com/busyorg/busy/issues/1647
Thank you @fabien for pointing me the problem.
Usage
const MarkdownIt = require('markdown-it')
const htmlFix = require('@blocker/markdown-it-mixed-html-fix')
const md = new MarkdownIt()
md.use(htmlFix)
Package: @blocker/markdown-it-image-proxy
Simple, but powerful plugin for parsing images with a prefix / proxy URL, just like Steemit & Busy uses https://steemitimages.com/0x0.
Usage
const MarkdownIt = require('markdown-it')
const imageProxy = require('@blocker/markdown-it-image-proxy')
const md = new MarkdownIt()
md.use(imageProxy, {
// default proxy URL prefix.
proxy: 'https://steemitimages.com/0x0/',
// bypass for images on the following domains (defaults to none).
trusted: [
'https://i.imgur.com',
'https://image.ibb.co'
]
})
This will be enough to parse all image tags with the steemitimages.com prefix.
Notice, that while prefixing image URL's, it will bypass the prefixing for the trusted
origins.
Technology Stack
Minimalist Javascript, built with Rollup.
Roadmap
Those are the first installments of a series of plugins for Markdown-It, I mean to cover all Steem related parsing and sanitization as possible and bundle on a single parser package later.
How to contribute?
Github issues, comment or contact on Discord (@hernandev#5834
)