We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0726ee1 commit 514c0c0Copy full SHA for 514c0c0
app/Thumbnail.jsx
@@ -4,7 +4,9 @@ import {BASE_PATH} from "./shared.js";
4
5
function removeEmptyLines(string) {
6
const [first, ...rest] = string.split("\n").filter((line) => line.trim() !== "");
7
- return first + rest.join("\n");
+ // If the first line ends with <code>, the code is already in the first line.
8
+ if (first.endsWith("<code>")) return first + rest.join("\n");
9
+ return first + "\n" + rest.join("\n");
10
}
11
12
export function Thumbnail({html, outputStartLine = null, snap = null}) {
0 commit comments