Skip to content

Commit

Permalink
Merge pull request #1307 from danbentley/fix/minor-typo-in-html-eleme…
Browse files Browse the repository at this point in the history
…nt-config-1306

fix: [#1306] Minor typo in HTMLElementConfig
  • Loading branch information
capricorn86 authored Mar 14, 2024
2 parents 9db51bb + 9e710a2 commit 0c015f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions packages/happy-dom/src/config/HTMLElementConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLElement',
localName: 'dd',
tagName: 'DD',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
del: {
className: 'HTMLElement',
Expand Down Expand Up @@ -261,7 +261,7 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLElement',
localName: 'dt',
tagName: 'DT',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
em: {
className: 'HTMLElement',
Expand Down Expand Up @@ -303,37 +303,37 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLElement',
localName: 'h1',
tagName: 'H1',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
h2: {
className: 'HTMLElement',
localName: 'h2',
tagName: 'H2',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
h3: {
className: 'HTMLElement',
localName: 'h3',
tagName: 'H3',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
h4: {
className: 'HTMLElement',
localName: 'h4',
tagName: 'H4',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
h5: {
className: 'HTMLElement',
localName: 'h5',
tagName: 'H5',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
h6: {
className: 'HTMLElement',
localName: 'h6',
tagName: 'H6',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
head: {
className: 'HTMLElement',
Expand Down Expand Up @@ -399,7 +399,7 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLElement',
localName: 'li',
tagName: 'LI',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
main: {
className: 'HTMLElement',
Expand Down Expand Up @@ -477,7 +477,7 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLOptionElement',
localName: 'option',
tagName: 'OPTION',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
output: {
className: 'HTMLElement',
Expand Down Expand Up @@ -621,7 +621,7 @@ export default <{ [key: string]: IHTMLElementConfigEntity }>{
className: 'HTMLElement',
localName: 'table',
tagName: 'TABLE',
contentModel: HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants
contentModel: HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants
},
tbody: {
className: 'HTMLElement',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
enum HTMLElementConfigContentModelEnum {
rawText = 'rawText',
noSelfDescendants = 'noSelfDescendants',
noFirsLevelSelfDescendants = 'noFirsLevelSelfDescendants',
noFirstLevelSelfDescendants = 'noFirstLevelSelfDescendants',
noDescendants = 'noDescendants',
anyDescendants = 'anyDescendants'
}
Expand Down
2 changes: 1 addition & 1 deletion packages/happy-dom/src/xml-parser/XMLParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class XMLParser {
// Therefore we need to auto-close the tag, so that it become valid (e.g. "<a></a><a></a>").
if (
config?.contentModel ===
HTMLElementConfigContentModelEnum.noFirsLevelSelfDescendants &&
HTMLElementConfigContentModelEnum.noFirstLevelSelfDescendants &&
stackTagNames[stackTagNames.length - 1] === tagName
) {
stack.pop();
Expand Down

0 comments on commit 0c015f5

Please sign in to comment.