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

Possibly shown user errors in inserted code #130

Open
HardCoreQual opened this issue Aug 13, 2022 · 1 comment
Open

Possibly shown user errors in inserted code #130

HardCoreQual opened this issue Aug 13, 2022 · 1 comment

Comments

@HardCoreQual
Copy link

HardCoreQual commented Aug 13, 2022

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

@jaywcjlove
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants