jaywcjlove / parcel-plugin-markdown-string

📦@parcel-bundler plugin for loader markdown string, markdown output HTML.

Home Page:https://jaywcjlove.github.io/parcel-plugin-markdown-string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown with JS code block breaks with template literal interpolation

atomiks opened this issue · comments

code.md (remove blackslash \)

\`\`\`js
const age = 100
const str = `Hello, I am ${age} years old.`
\`\`\`

index.js

import code from './code.md'

index.html

<script src="index.js"></script>

package.json

"scripts": {
  "start": "parcel index.html"
}

Uncaught ReferenceError: age is not defined