Skip to content

Commit

Permalink
Separate the TAGS into HTML_TAGS and SVG_TAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedAli00949 authored and joshgoebel committed Oct 21, 2023
1 parent 797af0e commit 7b2622e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/languages/lib/css-shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const MODES = (hljs) => {
};
};

export const TAGS = [
const HTML_TAGS = [
'a',
'abbr',
'address',
Expand Down Expand Up @@ -115,7 +115,10 @@ export const TAGS = [
'tr',
'ul',
'var',
'video',
'video'
];

const SVG_TAGS = [
'defs',
'g',
'marker',
Expand Down Expand Up @@ -159,6 +162,11 @@ export const TAGS = [
'clipPath'
];

export const TAGS = [
...HTML_TAGS,
...SVG_TAGS,
];

// Sorting, then reversing makes sure longer attributes/elements like
// `font-weight` are matched fully instead of getting false positives on say `font`

Expand Down

0 comments on commit 7b2622e

Please sign in to comment.