Skip to content

attach shortcode bindings to parser instances rather than singleton #2

@ericgj

Description

@ericgj

One thing I ran into was the limitation of the shortcode functions being attached to a singleton -- it means if you want to attach different functions to the same name in different places in your code, you have to be careful.

Ideally it would be nice to have something like

var Parser = require('shortcodes-parser');  
var parser = new Parser();

where each parser instance has its own set of shortcode bindings. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions