Comments (2)
I would recommend:
const body = ` \`\`\` console.log('Code Tab A'); \`\`\` \`\`\` console.log('Code Tab B'); \`\`\` `;
I've done a few things:
1. Wrapped the markdown snippet in backticks (`) to create a [template string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals). I believe normal strings don't support multi-line strings. 2. Escape the backticks in the markdown snippet, that way they don't close or start new template strings.
It worked. Thanks!
Closing this issue
from markdown.
I would recommend:
const body = `
\`\`\`
console.log('Code Tab A');
\`\`\`
\`\`\`
console.log('Code Tab B');
\`\`\`
`;
I've done a few things:
-
Wrapped the markdown snippet in backticks (`) to create a template string. I believe normal strings don't support multi-line strings.
-
Escape the backticks in the markdown snippet, that way they don't close or start new template strings.
from markdown.
Related Issues (20)
- Investigate double curly-brace errors.
- Normalize list indentation.
- Markdown code block closing incorrectly HOT 1
- Should tabbed code blocks allow indentation? HOT 1
- Should tabbed code blocks allow an unclosed code block? HOT 3
- Quoted tabbed code blocks??? HOT 1
- Should allow blank headers of depth greater than 1 HOT 1
- Should handle strong emphasis correctly
- Integrate TOC styling
- Feature request: allow sanitization configuration HOT 1
- SECURITY: High Severity Vulnerability HOT 2
- Markdown syntax for images that supports sizing and captions HOT 6
- React processor throws "ReferenceError: process is not defined" HOT 1
- Module not found: Can't resolve '@readme/variable' HOT 6
- Are mermaid style diagrams supported? HOT 1
- Don't insert <br> on new lines when syncing markdown HOT 10
- Mermaid.js Support HOT 3
- Security issue in dependencies HOT 6
- React 18 support? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown.