Skip to content

Commit

Permalink
backport: (parser) use null prototype objects for languages/aliases (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Jul 24, 2020
1 parent d72f081 commit 107d97b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/highlight.js
Expand Up @@ -33,8 +33,8 @@ https://highlightjs.org/
objectKeys = Object.keys;

// Global internal variables used within the highlight.js library.
var languages = {},
aliases = {};
var languages = Object.create(null),
aliases = Object.create(null);

// safe/production mode - swallows more errors, tries to keep running
// even if a single syntax or parse hits a fatal error
Expand Down

0 comments on commit 107d97b

Please sign in to comment.