Skip to content

Commit ccb2d93

Browse files
claudecoliff
authored andcommitted
test(html-lang-require): reject lang values with a trailing newline
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FN9Si1bR6igGbuoJ7ZGJWb
1 parent 4a97fab commit ccb2d93

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎test/rules/html-lang-require.spec.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ describe(`Rules: ${ruleId}`, () => {
4141
const messages = HTMLHint.verify(code, ruleOptions)
4242
expect(messages.length).toBe(1)
4343
})
44+
it('HTML tag with a lang value ending in a newline should result in an error', () => {
45+
const code = '<html lang="en\n"></html>'
46+
const messages = HTMLHint.verify(code, ruleOptions)
47+
expect(messages.length).toBe(1)
48+
})
4449
})

0 commit comments

Comments
 (0)