Skip to content

chore: enable html on preview playground#5105

Merged
ikatyang merged 1 commit intoprettier:masterfrom
ikatyang:chore/html-preview-playground
Sep 19, 2018
Merged

chore: enable html on preview playground#5105
ikatyang merged 1 commit intoprettier:masterfrom
ikatyang:chore/html-preview-playground

Conversation

@ikatyang
Copy link
Copy Markdown
Member

@ikatyang ikatyang commented Sep 18, 2018

Prettier pr-5105
Playground link

--parser parse5

Input:

<!DOCTYPE html>
<HTML CLASS="no-js mY-ClAsS">
  <HEAD>
    <META CHARSET="utf-8">
    <TITLE>My tITlE</TITLE>
    <META NAME="description" content="My CoNtEnT">
  </HEAD>
  <body>
    <P>Hello world!<BR> This is HTML5 Boilerplate.</P>
    <SCRIPT>
      window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
      ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
    </script>
    <SCRIPT src="https://www.google-analytics.com/analytics.js" ASYNC DEFER></script>
  </body>
</HTML>

Output:

<!DOCTYPE html>
<html class="no-js mY-ClAsS">
  <head>
    <meta charset="utf-8">
    <title>My tITlE</title>
    <meta name="description" content="My CoNtEnT">
  </head>
  <body>
    <p>
      Hello world!<br>
      This is HTML5 Boilerplate.
    </p>
    <script>
    window.ga = function() {
      ga.q.push(arguments);
    };
    ga.q = [];
    ga.l = +new Date();
    ga("create", "UA-XXXXX-Y", "auto");
    ga("send", "pageview");
    </script>
    <script
      src="https://www.google-analytics.com/analytics.js"
      async
      defer
    ></script>
  </body>
</html>

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.

@ikatyang ikatyang mentioned this pull request Sep 18, 2018
26 tasks
@ikatyang ikatyang merged commit 79f4251 into prettier:master Sep 19, 2018
@ikatyang ikatyang deleted the chore/html-preview-playground branch September 19, 2018 01:19
@ikatyang ikatyang added this to the 1.15 milestone Oct 25, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants