File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
test/unit/modules/compiler Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ const bindRE = /^:|^v-bind:/
23
23
const onRE = / ^ @ | ^ v - o n : /
24
24
const argRE = / : ( .* ) $ /
25
25
const modifierRE = / \. [ ^ \. ] + / g
26
- const camelRE = / [ a - z \d ] [ A - Z ] /
27
26
28
27
const decodeHTMLCached = cached ( decodeHTML )
29
28
@@ -60,16 +59,8 @@ export function parse (
60
59
expectHTML : options . expectHTML ,
61
60
isUnaryTag : options . isUnaryTag ,
62
61
start ( tag , attrs , unary ) {
63
- // check camelCase tag
64
- if ( camelRE . test ( tag ) ) {
65
- process . env . NODE_ENV !== 'production' && warn (
66
- `Found camelCase tag in template: <${ tag } >. ` +
67
- `I've converted it to <${ hyphenate ( tag ) } > for you.`
68
- )
69
- tag = hyphenate ( tag )
70
- }
71
-
72
- tag = tag . toLowerCase ( )
62
+ // normalize tag name
63
+ tag = hyphenate ( tag )
73
64
74
65
// check namespace.
75
66
// inherit parent ns if there is one
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ describe('parser', () => {
48
48
const ast = parse ( '<MyComponent><p>hello world</p></MyComponent>' , baseOptions )
49
49
expect ( ast . tag ) . toBe ( 'my-component' )
50
50
expect ( ast . plain ) . toBe ( true )
51
- expect ( 'Found camelCase tag in template' ) . toHaveBeenWarned ( )
52
51
expect ( ast . children [ 0 ] . tag ) . toBe ( 'p' )
53
52
expect ( ast . children [ 0 ] . plain ) . toBe ( true )
54
53
expect ( ast . children [ 0 ] . children [ 0 ] . text ) . toBe ( 'hello world' )
You can’t perform that action at this time.
0 commit comments