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

feat(highlight-auto): include language in "on:highlight" event detail #252

Merged
merged 2 commits into from
Dec 29, 2022

Conversation

metonym
Copy link
Owner

@metonym metonym commented Dec 29, 2022

Features

  • include the inferred language name in on:highlight event detail

Fixes

  • e.detail.highlighted is a string
<HighlightAuto
  code={`body {\n  padding: 0;\n  color: red;\n}`}
  on:highlight={(e) => {
    console.log(e.detail.language); // "css"
  }}
/>

@render
Copy link

render bot commented Dec 29, 2022

@render
Copy link

render bot commented Dec 29, 2022

@metonym metonym force-pushed the highlight-auto-dispatch-inferred-language branch from 92bcd88 to bc0e383 Compare December 29, 2022 23:46
@metonym metonym merged commit 2c82ca3 into master Dec 29, 2022
@metonym metonym deleted the highlight-auto-dispatch-inferred-language branch December 29, 2022 23:50
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

Successfully merging this pull request may close these issues.

1 participant