Questions tagged [react-syntax-highlighter]
19 questions
0
votes
1 answer
Highlighting curl code snippet in react syntax highlighter
I was trying to highlight curl code snippet in my react application.
I am using react-syntax-highlighter for the same.
The problem, curl code is not coming properly aligned. below my code snippet.
import SyntaxHighlighter from…

abinas patra
- 359
- 3
- 21
0
votes
2 answers
How can I import a JS file with special characters in it's name in React and JSX?
How can I import a JS file with special characters in it's name in React and JSX?
I can
import { tomorrow} from 'react-syntax-highlighter/dist/esm/styles/hljs';
(the folder contains tomorrow.js and tomrorrow-night.js)
but I can't:
import {…

Toby Maguire
- 146
- 1
- 11
0
votes
1 answer
Why are styles from react-syntax-highlighter/dist/esm/styles/prism not working as expected?
this my code
import SyntaxHighlighter from "react-syntax-highlighter";
import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";
const App = () => {
const x = `
for (let i = 0; i < haystack.length; i++) {
if…

Edgar
- 6,022
- 8
- 33
- 66
-1
votes
1 answer
how to import file with special character in name
How can I import a file with special characters in it's name in ES6?
I can
import { tomorrow} from 'react-syntax-highlighter/dist/esm/styles/hljs';
but I can't:
import { tomorrow-night} from 'react-syntax-highlighter/dist/esm/styles/hljs';

Toby Maguire
- 146
- 1
- 11