Skip to content

Commit

Permalink
fix: Ensure cellPadding, cellSpacing, and useMap are lower-cased
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed May 11, 2024
1 parent e2c8fa1 commit 5bf7d31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;
export const UNSAFE_NAME = /[\s\n\\/='"\0<>]/;
export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;
export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/;
export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^cell|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|useM|item[A-Z]/;
export const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;

// DOM properties that should NOT have "px" added when numeric
Expand Down
6 changes: 3 additions & 3 deletions test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ export const htmlAttributes = {
autoFocus: 'autofocus',
autoPlay: 'autoplay',
capture: 'capture',
cellPadding: 'cellPadding',
cellSpacing: 'cellSpacing',
cellPadding: 'cellpadding',
cellSpacing: 'cellspacing',
charSet: 'charset',
challenge: 'challenge',
checked: 'checked',
Expand Down Expand Up @@ -412,7 +412,7 @@ export const htmlAttributes = {
target: 'target',
title: 'title',
type: 'type',
useMap: 'useMap',
useMap: 'usemap',
value: 'value',
volume: 'volume',
width: 'width',
Expand Down

0 comments on commit 5bf7d31

Please sign in to comment.