Markdown not rendering when object keys passed to `content`
Closed this issue ยท 2 comments
Hello! Maybe I'm missing something.
Currently, I cannot use any custom content
functions in tandem with the preexisting markdown functions. The source code looks like it should add the markdown functions regardless, but this isn't the case.
const reshape = require('reshape')
const standard = require('reshape-standard')
reshape(standard({}))
.process('<p mdi>**abc** _def_</p>')
.then((res) => console.log(res.output()))
produces (as expected):
<p>
<strong>abc</strong>
<em>def</em>
</p>
However:
reshape(standard({
content: {
yell: (str) => str.toUpperCase()
}
}))
.process('<p mdi yell>**abc** _def_</p>')
.then((res) => console.log(res.output()))
produces (doesn't render markdown):
<p mdi>**ABC** _DEF_</p>
I'd really like md
and mdi
to function without having to re-add them manually ๐
Hey Colby!
So I haven't actually run into this use-case before, surprisingly, and there isn't a test for it, but I think getting a test in place would be the first step towards fixing it. The correct repo for this issue (and the fix) is here: https://github.com/reshape/content
Would you be interested in taking a shot at digging deeper and/or fixing the issue? It's a very simple piece of code and this is a fantastic opportunity to get started with a contribution ๐
I agree! I'll see what I can whip up. ๐