Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Mar 8, 2024
1 parent 4b69210 commit 34a9428
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,5 @@ export function strip(markdown: string, opts: RenderOptions = {}): string {
...getOpts(opts),
tokenizer: new StripTokenizer(),
});
return stripTokens(tokens).replace(/\n{3,}/g, "\n");
return stripTokens(tokens).replace(/\n{3,}/g, "\n").trim();
}
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Deno.test("h1 test", () => {

const html = render(markdown);
assertEquals(html, result);
assertEquals(strip(markdown), "hello");
assertEquals(strip(markdown), "Hello");
});

Deno.test("svg test", () => {
Expand Down

0 comments on commit 34a9428

Please sign in to comment.