Skip to content

Removes styles contained within a template #7

@matthewp

Description

@matthewp

When you have styles like:

<template>
  <style>
    .root { display: block; }
  </style>
</template>

This style tag is removed from the template and used as the codepen's CSS. This is incorrect in this case, styles within a template should remain part of the template.

var CSS;
var styleResults = HTML.match(styleRegExp);
if (styleResults) {
HTML = HTML.replace(styleResults[0], "").trim();
CSS = styleResults[1].trim();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions