djm / remark-shortcodes

A custom Markdown syntax parser for remark that adds support for shortcodes.
MIT License
45 stars 7 forks source link

Any way to parse a shortcode in a line of text ? #5

Closed gnuletik closed 5 years ago

gnuletik commented 6 years ago

Hi,

I'd like to know if there is any way to use parse a shortcode in a line. For example:

But they are configurable, so if you're coming from Hugo say,
you can set them as such: {{< MailchimpForm id="chfk2" >}}

And thanks for your project !

djm commented 6 years ago

Hi @gnuletik!

I'm afraid not, this package only operates at the block level at the moment as that fitted my requirements when I wrote it.

That being said, I would be open to a PR which adds that functionality if it can be done in a reasonable way without affecting the block level support.

I'll leave this PR open for now so that others are aware of the inline status.

Thanks.

emohamed commented 5 years ago

Hi guys,

I needed this for a project, so I hacked a quick(and a little ugly) solution.

See https://github.com/djm/remark-shortcodes/compare/master...emohamed:feature/inline-shortcodes

@djm let me know if you'd like me to clean up the code and submit a PR.

Thanks!

djm commented 5 years ago

@jeansaad has kindly provided a solution to this, with the new inlineMode support. It will get a release very shortly. I'll update here when it's out.

djm commented 5 years ago

v0.3.0 has been tagged; the release should build out to npm now.

Thanks all.

jeansaad commented 5 years ago

@djm, how immediate is the publishing to NPM? I have yet to see it there.

djm commented 5 years ago

It should be immediate! But the Travis build skipped the deployment:

Skipping a deployment with the releases provider because this is not on the required runtime

Will fix ASAP.

yuliyan commented 5 years ago

@djm, when can we expect the 0.3.0 to be published on npm?

djm commented 5 years ago

@yuliyan Sorry for the delay, hopefully this weekend. I've got to sort out the Travis build -> npm release which is currently broken.

j-dowell commented 5 years ago

@djm hey are you still planning on publishing 0.3.0 to npm?