Closed jywarren closed 6 years ago
There may be a more up-to-date way to do this, perhaps modeling on what happens in https://github.com/bevacqua/woofmark/blob/2d932112d44c7f72ccc9e23daf6749b9cc8bcdde/src/markdown/linkOrImageOrAttachment.js -- but it's a bit obscure to me, so I'll stick with a minimal change for now.
Fix submitted in #46!
Finally got this bug!
This needs to be set to
upload.validate || 'image'
, to properly set validator as in README: https://github.com/bevacqua/woofmark#optionsattachments.https://github.com/bevacqua/woofmark/blob/master/src/prompts/prompt.js#L116
I also found that after solving that, I got
options.mergeHtmlAndAttachment is not a function
on this line:https://github.com/bevacqua/woofmark/blob/2d932112d44c7f72ccc9e23daf6749b9cc8bcdde/src/html/linkOrImageOrAttachment.js#L51
That's because that should be specified here:
https://github.com/bevacqua/woofmark/blob/2d932112d44c7f72ccc9e23daf6749b9cc8bcdde/src/bindCommands.js#L74
But that doesn't seem to appear anywhere else in the codebase. I think it could be from a previous version of the API, but it seems to be pretty simple:
And it expects:
I'm going to try just adding a default that wraps it in an
<a>
tag.Happy to submit a PR shortly.