Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override parser #24

Closed
Perlkonig opened this issue Nov 6, 2016 · 2 comments
Closed

Override parser #24

Perlkonig opened this issue Nov 6, 2016 · 2 comments

Comments

@Perlkonig
Copy link

Is there a way for my shortcode plugin to override the shortcode-core parser setting? I tried just adding a parser setting to my config file, but that didn't do it. I'm having trouble with my new shortcode recognizing quoted parameters containing spaces.

@Perlkonig
Copy link
Author

So my quoting problem was because of the smartypants plugin. I'm still curious about overriding the parser setting, though. Thanks!

@rhukster
Copy link
Member

You can actually just set the value via the config object:

$this-grav['config']->set('plugins.shortcode-core.parser', 'regex');

Just make sure you set this early enough that the config is there, but before any parsing is done. Should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants