diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-17 01:35:04 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-17 01:35:04 +0900 |
| commit | 0766039bd9e6b9f5e6334e84666f5be698d41fc3 (patch) | |
| tree | 0f3a52fdbf56496850f903d64dcf7725fb0aedbe /nuldoc-src/html.ts | |
| parent | ee72f8780cf3681e4202cc3a6358fb4038db1ec8 (diff) | |
| download | blog.nsfisis.dev-0766039bd9e6b9f5e6334e84666f5be698d41fc3.tar.gz blog.nsfisis.dev-0766039bd9e6b9f5e6334e84666f5be698d41fc3.tar.zst blog.nsfisis.dev-0766039bd9e6b9f5e6334e84666f5be698d41fc3.zip | |
feat(nuldoc): implement syntax highlight
Diffstat (limited to 'nuldoc-src/html.ts')
| -rw-r--r-- | nuldoc-src/html.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nuldoc-src/html.ts b/nuldoc-src/html.ts index 5e573ad..70b5748 100644 --- a/nuldoc-src/html.ts +++ b/nuldoc-src/html.ts @@ -122,8 +122,8 @@ function nodeToHtmlText(n: Node, ctx: Context): string { } function textNodeToHtmlText(t: Text, ctx: Context): string { + if (ctx.isInPre) return t.content; const s = encodeSpecialCharacters(t.content); - if (ctx.isInPre) return s; // TODO: 日本語で改行するときはスペースを入れない return s |
