- {tokens.map((line, i) => {
- const lineProps = getLineProps({ line, key: i });
+ <>
+ {codeBlockTitle && (
+
+ {codeBlockTitle}
+
+ )}
+
+ {/* */}
+
+
+ {tokens.map((line, i) => {
+ if (line.length === 1 && line[0].content === "") {
+ line[0].content = "\n"; // eslint-disable-line no-param-reassign
+ }
- if (highlightLines.includes(i + 1)) {
- lineProps.className = `${lineProps.className} docusaurus-highlight-code-line`;
- }
+ const lineProps = getLineProps({ line, key: i });
- return (
-
- {line.map((token, key) => (
-
- ))}
-
- );
- })}
-
- {/* */}
-
+ if (highlightLines.includes(i + 1)) {
+ lineProps.className = `${lineProps.className} docusaurus-highlight-code-line`;
+ }
+
+ return (
+
+ {line.map((token, key) => (
+
+ ))}
+
+ );
+ })}
+
+
+