Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 74ed4a9

Browse files
Merge pull request #28 from OpenTabletDriver/codeblock-newline
CodeBlockTagHelper: Fix newlines not being copied
2 parents c1c8f54 + 46a2fc3 commit 74ed4a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OpenTabletDriver.Web/TagHelpers/CodeBlockTagHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private IEnumerable<string> LanguageFormat(IList<string> lines, string language)
6060
{
6161
var nextLine = lines[i + 1];
6262
const string tag = "span";
63-
yield return $"<{tag} class=\"text-muted\">{line}</{tag}>{nextLine}";
63+
yield return $"<{tag} class=\"text-muted\">{line}{Environment.NewLine}</{tag}>{nextLine}";
6464
i++;
6565
}
6666
else
@@ -80,7 +80,7 @@ private IEnumerable<string> LanguageFormat(IList<string> lines, string language)
8080
{
8181
var nextLine = lines[i + 1];
8282
const string tag = "span";
83-
yield return $"<{tag} class=\"text-info\">{line}</{tag}>{nextLine}";
83+
yield return $"<{tag} class=\"text-info\">{line}{Environment.NewLine}</{tag}>{nextLine}";
8484
i++;
8585
}
8686
else

0 commit comments

Comments
 (0)