Skip to content

Commit

Permalink
ci: 🐝 bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
rodneylab committed Nov 28, 2024
1 parent 0a94ebf commit 4ee5b8e
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .cz.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commitizen": {
"name": "cz_conventional_commits",
"version": "1.4.2",
"version": "1.4.3",
"tag_format": "$version",
"bump_message": "ci: release $current_version \u2192 $new_version [skip-ci]"
}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "parsedown"
version = "1.4.2"
version = "1.4.3"
authors = ["Rodney Johnson <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
markdownToHtml,
markdownToPlaintext,
mjmlToHtml,
} from "https://deno.land/x/[email protected].2/mod.ts";
} from "https://deno.land/x/[email protected].3/mod.ts";

const { errors, headings, html, statistics } = await markdownToHtml(
`
Expand Down Expand Up @@ -83,7 +83,7 @@ import {
markdownToHtml,
markdownToPlaintext,
mjmlToHtml,
} from "https://deno.land/x/[email protected].2/mod.ts";
} from "https://deno.land/x/[email protected].3/mod.ts";

const plaintext = await markdownToPlaintext(
`
Expand Down Expand Up @@ -116,7 +116,7 @@ import {
markdownToHtml,
markdownToPlaintext,
mjmlToHtml,
} from "https://deno.land/x/[email protected].2/mod.ts";
} from "https://deno.land/x/[email protected].3/mod.ts";

const html = await mjmlToHtml("<mjml></mjml>");

Expand Down
4 changes: 2 additions & 2 deletions lib/parsedown.generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// deno-fmt-ignore-file
/// <reference types="./parsedown.generated.d.ts" />

// source-hash: 46f7c37e12d1eeb6c63cde3a1e9c67ee20ae092a
// source-hash: e4fde3bd5a122432349fb0aa28da0d1827c4d198
let wasm;

const heap = new Array(128).fill(undefined);
Expand Down Expand Up @@ -337,7 +337,7 @@ const imports = {
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
},
__wbg_log_c2f8b8d74b0d9be7: function (arg0, arg1) {
__wbg_log_24068652cee20220: function (arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
},
__wbg_length_c20a40f15020d68a: function (arg0) {
Expand Down
Binary file modified lib/parsedown_bg.wasm
Binary file not shown.
92 changes: 46 additions & 46 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
import { instantiate } from "./lib/parsedown.generated.js";

interface MarkdownToHtmlOKOutput {
errors?: never;
headings: { heading: string; id: string }[];
html: string;
statistics: {
reading_time: number;
word_count: number;
};
errors?: never;
headings: { heading: string; id: string }[];
html: string;
statistics: {
reading_time: number;
word_count: number;
};
}

interface MarkdownToHtmlErrorOutput {
errors: string[];
headings?: never;
html?: never;
statistics?: never;
errors: string[];
headings?: never;
html?: never;
statistics?: never;
}

interface MarkdownToHtmlOptions {
canonicalRootUrl?: string;
enableSmartPunctuation?: string;
searchTerm?: string;
canonicalRootUrl?: string;
enableSmartPunctuation?: string;
searchTerm?: string;
}

type MarkdownToPlaintextOptions = Omit<MarkdownToHtmlOptions, "searchTerm">;
Expand All @@ -41,25 +41,25 @@ type MarkdownToPlaintextOptions = Omit<MarkdownToHtmlOptions, "searchTerm">;
* in the `.html` field of the returned object.
*/
const markdownToHtml: (
markdown: string,
options?: MarkdownToHtmlOptions,
markdown: string,
options?: MarkdownToHtmlOptions,
) => Promise<MarkdownToHtmlOKOutput | MarkdownToHtmlErrorOutput> =
async function markdownToHtml(markdown, options) {
const { markdown_to_html } = await instantiate();
const { canonicalRootUrl, enableSmartPunctuation, searchTerm } = options ??
{};
async function markdownToHtml(markdown, options) {
const { markdown_to_html } = await instantiate();
const { canonicalRootUrl, enableSmartPunctuation, searchTerm } = options ??
{};

return markdown_to_html(markdown, {
enable_smart_punctuation: true,
...(typeof canonicalRootUrl !== "undefined"
? { canonical_root_url: canonicalRootUrl }
: {}),
...(typeof enableSmartPunctuation !== "undefined"
? { enable_smart_punctuation: enableSmartPunctuation }
: {}),
...(typeof searchTerm !== "undefined" ? { search_term: searchTerm } : {}),
});
};
return markdown_to_html(markdown, {
enable_smart_punctuation: true,
...(typeof canonicalRootUrl !== "undefined"
? { canonical_root_url: canonicalRootUrl }
: {}),
...(typeof enableSmartPunctuation !== "undefined"
? { enable_smart_punctuation: enableSmartPunctuation }
: {}),
...(typeof searchTerm !== "undefined" ? { search_term: searchTerm } : {}),
});
};

/**
* Convert the, input, `markdown` string to plaintext, to use, for example in a broadcast email or
Expand All @@ -69,19 +69,19 @@ const markdownToHtml: (
* @returns `markdown` parsed into a plaintext string
*/
const markdownToPlaintext: (
markdown: string,
options?: MarkdownToPlaintextOptions,
markdown: string,
options?: MarkdownToPlaintextOptions,
) => Promise<string> = async function markdownToPlaintext(markdown, options) {
const { markdown_to_plaintext } = await instantiate();
const { canonicalRootUrl, enableSmartPunctuation } = options ?? {};
return markdown_to_plaintext(markdown, {
...(typeof canonicalRootUrl !== "undefined"
? { canonical_root_url: canonicalRootUrl }
: {}),
...(typeof enableSmartPunctuation !== "undefined"
? { enable_smart_punctuation: enableSmartPunctuation }
: {}),
});
const { markdown_to_plaintext } = await instantiate();
const { canonicalRootUrl, enableSmartPunctuation } = options ?? {};
return markdown_to_plaintext(markdown, {
...(typeof canonicalRootUrl !== "undefined"
? { canonical_root_url: canonicalRootUrl }
: {}),
...(typeof enableSmartPunctuation !== "undefined"
? { enable_smart_punctuation: enableSmartPunctuation }
: {}),
});
};

/**
Expand All @@ -91,10 +91,10 @@ const markdownToPlaintext: (
* @returns `markdown` parsed into a plaintext string
*/
const mjmlToHtml: (mjml: string) => Promise<string> = async function mjmlToHtml(
mjml,
mjml,
) {
const { mjml_to_html } = await instantiate();
return mjml_to_html(mjml);
const { mjml_to_html } = await instantiate();
return mjml_to_html(mjml);
};

export { markdownToHtml, markdownToPlaintext, mjmlToHtml };

0 comments on commit 4ee5b8e

Please sign in to comment.