diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-18 19:51:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-18 19:51:06 +0900 |
| commit | 7f15e0b8277ac8b101b4f71ce57c1c5442927141 (patch) | |
| tree | 31d54a18ede023adeb23a984c907860d667288bd /nuldoc-src/renderers | |
| parent | 032dc3c5e6d0ef84a9f4ea6be10e19b7f43c53b8 (diff) | |
| download | blog.nsfisis.dev-7f15e0b8277ac8b101b4f71ce57c1c5442927141.tar.gz blog.nsfisis.dev-7f15e0b8277ac8b101b4f71ce57c1c5442927141.tar.zst blog.nsfisis.dev-7f15e0b8277ac8b101b4f71ce57c1c5442927141.zip | |
fix(nuldoc): fix whitespaces being trimmed
Diffstat (limited to 'nuldoc-src/renderers')
| -rw-r--r-- | nuldoc-src/renderers/html.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nuldoc-src/renderers/html.ts b/nuldoc-src/renderers/html.ts index 3c49174..94d134b 100644 --- a/nuldoc-src/renderers/html.ts +++ b/nuldoc-src/renderers/html.ts @@ -125,9 +125,7 @@ function textNodeToHtmlText(t: Text, ctx: Context): string { if (ctx.isInPre) return s; // TODO: 日本語で改行するときはスペースを入れない - return s - .trim() - .replaceAll(/\n */g, " "); + return s.replaceAll(/\n */g, " "); } function encodeSpecialCharacters(s: string): string { |
