Skip to content

Commit 0687dbd

Browse files
committed
chore: update bundles
1 parent eaceb53 commit 0687dbd

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

.size-limit.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"build/globals.js",
3434
"build/deno.js"
3535
],
36-
"limit": "849.70 kB",
36+
"limit": "849.90 kB",
3737
"brotli": false,
3838
"gzip": false
3939
},
@@ -66,7 +66,7 @@
6666
"README.md",
6767
"LICENSE"
6868
],
69-
"limit": "911.40 kB",
69+
"limit": "911.60 kB",
7070
"brotli": false,
7171
"gzip": false
7272
}

build/cli.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function transformMarkdown(buf) {
7272
let endRe = /^$/;
7373
let linePrefix = "";
7474
let closeOut = "";
75+
let closeBlank = false;
7576
const isEnd = (s) => fenceChar && endRe.test(s);
7677
for (const line of (0, import_util.bufToString)(buf).split(/\r?\n/)) {
7778
switch (state) {
@@ -85,14 +86,17 @@ function transformMarkdown(buf) {
8586
out.push("");
8687
linePrefix = "";
8788
closeOut = "";
89+
closeBlank = true;
8890
} else if (g.bash) {
8991
out.push("await $`");
9092
linePrefix = "";
9193
closeOut = "`";
94+
closeBlank = false;
9295
} else {
9396
out.push("");
9497
linePrefix = "// ";
9598
closeOut = "";
99+
closeBlank = true;
96100
}
97101
state = "fence";
98102
prevEmpty = false;
@@ -105,6 +109,7 @@ function transformMarkdown(buf) {
105109
}
106110
prevEmpty = line === "";
107111
out.push("// " + line);
112+
continue;
108113
}
109114
case "tab":
110115
if (line === "") out.push("");
@@ -118,6 +123,7 @@ function transformMarkdown(buf) {
118123
case "fence":
119124
if (isEnd(line)) {
120125
if (closeOut) out.push(closeOut);
126+
else if (closeBlank) out.push("");
121127
state = "root";
122128
prevEmpty = true;
123129
} else {

src/md.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
import { type Buffer } from 'node:buffer'
216
import { bufToString } from './util.ts'
317

0 commit comments

Comments
 (0)