Skip to content

Commit

Permalink
Expose refractor alias function on prism light syntax highlighter
Browse files Browse the repository at this point in the history
This allows client applications to register aliases for languages without having to try and access refractor directly. Useful for aliasing languages under other acronyms.
  • Loading branch information
cahilfoley authored and conorhastings committed Nov 14, 2021
1 parent a07d67e commit ac5df05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/prism-light.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ const SyntaxHighlighter = highlight(refractor, {});
SyntaxHighlighter.registerLanguage = (_, language) =>
refractor.register(language);

SyntaxHighlighter.alias = (name, aliases) =>
refractor.alias(name, aliases);

export default SyntaxHighlighter;

0 comments on commit ac5df05

Please sign in to comment.