Skip to content

Hello, I was making html using javascript #575

@utong-sadu

Description

@utong-sadu

Hello, I was making html using javascript

At some point I put a closing body tag in a string:

  <script>
    const myHtml = `
    ...
    </body>
    ...
    `
    console.log("hello world")
  </script>
Image

I was rather confused that everything after that closing body tag was now being directly shown as raw text in my browser, eventhough it was javascript code.

Commenting the string also did nothing to fix the problem.
(I mean like this)

// const myHtml = `
// ...
// </body>
// ...
// `

In other words, breaks the live server parsing.

Originally posted by @troshujin in ritwickdey/vscode-live-server-plus-plus#108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions