Skip to content

Commit

Permalink
Merge pull request #111 from rodneylab/fix__linting
Browse files Browse the repository at this point in the history
fix  linting
  • Loading branch information
rodneylab authored Nov 28, 2024
2 parents 976eb74 + 4ee5b8e commit 915cd7f
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 28 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.
15 changes: 8 additions & 7 deletions src/html_process/dom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
* except according to those terms.
*/

use std::{
borrow::Cow,
cell::{Cell, RefCell},
collections::{HashSet, VecDeque},
fmt, io, mem,
rc::{Rc, Weak},
};

use html5ever::{
interface::tree_builder::{self, ElementFlags, NodeOrText, QuirksMode, TreeSink},
serialize::{
Expand All @@ -17,13 +25,6 @@ use html5ever::{
tendril::StrTendril,
Attribute, ExpandedName, QualName,
};
use std::{
borrow::Cow,
cell::{Cell, RefCell},
collections::{HashSet, VecDeque},
fmt, io, mem,
rc::{Rc, Weak},
};

#[derive(Debug)]
pub enum NodeData {
Expand Down
17 changes: 10 additions & 7 deletions src/html_process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
mod tests;

mod dom;
use crate::url_utility::relative_url;

use std::{
cell::RefCell,
fmt::{self, Display},
mem,
rc::Rc,
};

use aho_corasick::AhoCorasickBuilder;
use dom::{Handle, Node, NodeData, RcDom, SerializableHandle};
use html5ever::{
Expand All @@ -37,12 +44,8 @@ use html5ever::{
tendril::{format_tendril, StrTendril, TendrilSink},
Attribute, QualName,
};
use std::{
cell::RefCell,
fmt::{self, Display},
mem,
rc::Rc,
};

use crate::url_utility::relative_url;

#[derive(Debug)]
pub struct Builder<'a> {
Expand Down
1 change: 0 additions & 1 deletion src/inline_html/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use nom::{
#[non_exhaustive]
pub enum InlineHTMLTagType {
Opening(String),
//SelfClosing,
Closing(String),
}

Expand Down
13 changes: 8 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ mod markdown;
mod url_utility;
mod utilities;

use html_process::process_html;
use markdown::{
parse_markdown_to_html, parse_markdown_to_plaintext, Heading, ParseMarkdownOptions,
TextStatistics,
};
use serde::{Deserialize, Serialize};
use wasm_bindgen::{prelude::*, JsValue};

use crate::{
html_process::process_html,
markdown::{
parse_markdown_to_html, parse_markdown_to_plaintext, Heading, ParseMarkdownOptions,
TextStatistics,
},
};

#[wasm_bindgen]
extern "C" {
// Use `js_namespace` here to bind `console.log(..)` instead of just
Expand Down

0 comments on commit 915cd7f

Please sign in to comment.