Skip to content

Possibly shown user errors in inserted code #130

Open

Description

@HardCoreQual

think will be great to add the possibility send errors props with the format

type Errors = {
   startAt: number; // start position in string
   endAt: number; // end position in string
   message: string; // message by hover
}[]

startAt, endAt will use to add a red underline for the respective code
the message will show by hovering over the error line, but it is harder to implement

Activity

  1. jaywcjlove commented on Aug 14, 2022

    @jaywcjlove
    Member

    @HardCoreQual Maybe your idea can be implemented with plugins + css.

      /**
       * rehypePlugins (Array.<Plugin>, default: `[[rehypePrism, { ignoreMissing: true }]]`)  
       * List of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins) to use. See the next section for examples on how to pass options
       */
      rehypePlugins?: PluggableList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions