Skip to content

Use metaOptions instead of meta in the guide #281

Description

@sorawee

https://expressive-code.com/guides/developing-plugins/ has these lines:

    hooks: {
      preprocessCode: (context) => {
        // Only apply this to code blocks with the `error-preview` meta
        if (!context.codeBlock.meta.includes('error-preview')) return

However, meta is the whole meta string, which could contain stuff like:

my-other-plugin del="error-preview"

which would also activate this plugin unintentionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions