File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { SerializableHead } from '../../types'
2
2
3
- const Attrs = / ( \w + ) (?: = [ " ' ] ( [ ^ " ' ] * ) [ " ' ] ) ? / g
3
+ const Attrs = / ( \w + - ? \w + ) (?: = [ " ' ] ( [ ^ " ' ] * ) [ " ' ] ) ? / g
4
4
const HtmlTag = / < h t m l [ ^ > ] * > /
5
5
const BodyTag = / < b o d y [ ^ > ] * > /
6
6
const HeadContent = / < h e a d [ ^ > ] * > ( .* ?) < \/ h e a d > / s
Original file line number Diff line number Diff line change @@ -132,6 +132,31 @@ describe('ssr', () => {
132
132
` )
133
133
} )
134
134
135
+ it ( 'multiword attributes in html template' , async ( ) => {
136
+ const head = createServerHeadWithContext ( )
137
+
138
+ expect ( await transformHtmlTemplate ( head , `
139
+ <html>
140
+ <head>
141
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
142
+ </head>
143
+ <body>
144
+ <!--app-html-->
145
+ </body>
146
+ </html>
147
+ ` ) ) . toMatchInlineSnapshot ( `
148
+ "
149
+ <html>
150
+ <head>
151
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"></head>
152
+ <body>
153
+ <!--app-html-->
154
+ </body>
155
+ </html>
156
+ "
157
+ ` )
158
+ } )
159
+
135
160
it ( 'useSeoMeta' , async ( ) => {
136
161
const head = createServerHeadWithContext ( )
137
162
You can’t perform that action at this time.
0 commit comments