Skip to content

Commit 99c8808

Browse files
authored
Small fixes (#64)
- Compile before linting since the web-ext lint step runs on the compiled outputs - Run prettier on src files
1 parent 90c5f5a commit 99c8808

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "npm run compile && web-ext build -n aoc-to-markdown-addon.zip -s addon --overwrite-dest",
88
"compile": "npm run genmanifest && webpack",
99
"genmanifest": "node ./tools/genmanifest.js ./src/manifest.json ./addon/manifest.json",
10-
"lint": "eslint . && web-ext lint -s addon",
10+
"lint": "eslint . && npm run compile && web-ext lint -s addon",
1111
"lint-fix": "eslint . --fix",
1212
"prepare": "npm run compile",
1313
"prestart": "npm run compile",

src/content_scripts/to-markdown.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function generateMarkdown(doc) {
4747
// ```html
4848
// <code>1 + 1 = <em>2</em></code>
4949
// ```
50-
//
50+
//
5151
// The default rendering results in the underscores being rendered, as there
5252
// isn't a proper way to render emphasis within code blocks without resorting
5353
// to HTML again. In this case the best solution is to drop the emphasis
@@ -57,8 +57,7 @@ function generateMarkdown(doc) {
5757
// where the previous code did not make a modification.
5858
turndownService.addRule("emphasisWithinCode", {
5959
filter: (node) =>
60-
node.nodeName == "EM" &&
61-
node.parentNode.nodeName == "CODE",
60+
node.nodeName == "EM" && node.parentNode.nodeName == "CODE",
6261
replacement: (content) => content,
6362
});
6463

@@ -75,7 +74,7 @@ function expandHrefs(article) {
7574
if (link.href) {
7675
// Reading the `href` seems to expand it, setting it back will make it
7776
// permanent.
78-
link.href = link.href
77+
link.href = link.href;
7978
}
8079
}
8180
}

0 commit comments

Comments
 (0)