Skip to content

Commit c431b6e

Browse files
committed
chore: lint and fmt
1 parent 5191828 commit c431b6e

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/tools/mod_html_to_readme_md.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function htmlToMd(html: string) {
7272
modifier.removeChild(type)
7373
modifier.innerHTML = `${modifier.innerHTML}`
7474
}
75-
if (name == "..") {
75+
if (name === "..") {
7676
name = "..."
7777
} else if (name) {
7878
const typings = metadata.typings.modifiers[name] ?? {}
@@ -135,6 +135,7 @@ function toMarkdown(elements: Array<Node> | Node | null, markdown = "") {
135135
markdown += `*${toMarkdown(Array.from(node.childNodes))}*`
136136
break
137137
// Bold
138+
case "STRONG":
138139
case "B":
139140
markdown += `**${toMarkdown(Array.from(node.childNodes))}**`
140141
break
@@ -173,7 +174,7 @@ function toMarkdown(elements: Array<Node> | Node | null, markdown = "") {
173174
break
174175
}
175176
default:
176-
console.log(node.tagName)
177+
log.with({ tag: node.tagName }).error("Unknown tag")
177178
markdown += toMarkdown(Array.from(node.childNodes))
178179
}
179180
}

@mizu/clean/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Clean up all spaces (except non-breaking spaces [`&nbsp;`](https://developer.moz
2424

2525
### `.templates[boolean]`
2626

27-
Clean up all [`<template>`](https://developer.mozilla.org/docs/Web/HTML/Element/template) nodes from subtree after processing the subtree entirely.
27+
Clean up all [`<template>`](https://developer.mozilla.org/docs/Web/HTML/Element/template) nodes from subtree **after processing the subtree entirely**.
2828

2929
### `.directives[boolean]`
3030

31-
Clean up all known directives from subtree after processing the subtree entirely. If `.comments` modifier is also enabled, then comments generated by directives will be cleaned up as well.
31+
Clean up all known directives from subtree **after processing the subtree entirely**. If `.comments` modifier is also enabled, then comments generated by directives will be cleaned up as well.

@mizu/markdown/mod_test.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,24 @@
2525
].join("\n")
2626
</script>
2727
<render>
28-
<pre><span *markdown.trim="value"></span></pre>
28+
<span *markdown.trim="value"></span>
2929
</render>
3030
<expect>
31-
<pre><span><p>foo</p></span></pre>
31+
<span><p>foo</p></span>
3232
</expect>
3333
<render>
34-
<pre><span *markdown.trim[false]="value"></span></pre>
34+
<span *markdown.trim[false]="value"></span>
3535
</render>
3636
<expect>
37-
<pre><span><pre><code> foo
38-
</code></pre></span></pre>
37+
<span><pre>
38+
<code> foo
39+
</code></pre></span>
3940
</expect>
4041
<render>
41-
<pre><span *markdown.trim="''"></span></pre>
42+
<span *markdown.trim="''"></span>
4243
</render>
4344
<expect>
44-
<pre><span></span></pre>
45+
<span></span>
4546
</expect>
4647
</test>
4748

0 commit comments

Comments
 (0)