centralise voidElementNames

pull/204/head
Rich-Harris 8 years ago
parent bb24ab6ea9
commit e45b15c3da

@ -4,9 +4,9 @@ import readStyle from '../read/style.js';
import { readEventHandlerDirective, readBindingDirective } from '../read/directives.js';
import { trimStart, trimEnd } from '../utils/trim.js';
import { decodeCharacterReferences } from '../utils/html.js';
import voidElementNames from '../../utils/voidElementNames.js';
const validTagName = /^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/;
const voidElementNames = /^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;
const invalidUnquotedAttributeCharacters = /[\s"'=<>\/`]/;
const specials = {

@ -4,8 +4,7 @@ import isReference from '../utils/isReference.js';
import flattenReference from '../utils/flattenReference.js';
import MagicString, { Bundle } from 'magic-string';
import processCss from '../generate/css/process.js';
const voidElementNames = /^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i;
import voidElementNames from '../utils/voidElementNames.js';
export default function compile ( parsed, source, { filename }) {
const code = new MagicString( source );

@ -0,0 +1 @@
export default /^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;
Loading…
Cancel
Save