You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an external markdown program, some words in the resulting html are concatenated, meaning "some word" becomes "someword". I am using cmark as markdown program.
The bug appears if the markdown compiler does not produce a space at the end of a line.
The fix is easy: in weaver.d append a space on every line read. Patch appended.
diff --git a/lit/weaver.lit b/lit/weaver.lit
index 0c8630f..bb058c4 100644
--- a/lit/weaver.lit
+++ b/lit/weaver.lit
@@ -128,7 +128,7 @@ if (useMdCompiler) {
pipes.stdin.close();
auto status = wait(pipes.pid);
string mdCompilerOutput;
- foreach (line; pipes.stdout.byLine) mdCompilerOutput ~= line.idup;
+ foreach (line; pipes.stdout.byLine) mdCompilerOutput ~= line.idup ~ " ";
if (status != 0) {
warn(p.file, 1, "Custom markdown compilation failed: " ~ mdCompilerOutput ~ " -- Falling back to built-in markdown compiler");
html = filterMarkdown(md, MarkdownFlags.disableUnderscoreEmphasis);
@@ -373,7 +373,7 @@ if (useMdCompiler) {
pipes.stdin.close();
auto status = wait(pipes.pid);
string mdCompilerOutput;
- foreach (line; pipes.stdout.byLine) mdCompilerOutput ~= line.idup;
+ foreach (line; pipes.stdout.byLine) mdCompilerOutput ~= line.idup ~ " ";
if (status != 0) {
warn(c.file, 1, "Custom markdown compilation failed: " ~ mdCompilerOutput ~ " -- Falling back to built-in markdown compiler");
html = filterMarkdown(md, MarkdownFlags.disableUnderscoreEmphasis);
The text was updated successfully, but these errors were encountered:
When using an external markdown program, some words in the resulting html are concatenated, meaning "some word" becomes "someword". I am using cmark as markdown program.
The bug appears if the markdown compiler does not produce a space at the end of a line.
The fix is easy: in weaver.d append a space on every line read. Patch appended.
The text was updated successfully, but these errors were encountered: