Skip to content

Release 2.1.0

Compare
Choose a tag to compare
@FIameCaster FIameCaster released this 01 Nov 16:10
· 306 commits to main since this release

New features

  • Added a word highlighting extension.
import { highlightCurrentWord } from "prism-code-editor/search"

const selector = ".string, .comment, .keyword, .regex"
const filter = start => !getClosestToken(editor, selector, 0, 0, start)

editor.addExtensions(
    highlightCurrentWord(filter)
)
  • Added a filter parameter to SearchAPI.search (6786676)

Fixes/improvements

  • Improved API documentation
  • Fixed a bug when toggling comments in languages without line comments (ec7d394)
  • The search widget could sometimes perform a search while closed if the user did an undo in Chrome (2cf42b8)
  • URLs in CSS are now highlighted in the GitHub themes (82120de)