Skip to content

Commit 75c9b31

Browse files
authored
Update and rename languagetool_reviewdog.py to clean-mdx.js
1 parent 99404df commit 75c9b31

2 files changed

Lines changed: 19 additions & 185 deletions

File tree

.github/scripts/clean-mdx.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// scripts/clean-mdx.js
2+
import fs from 'fs/promises';
3+
import { remark } from 'remark';
4+
import remarkMdx from 'remark-mdx';
5+
import strip from 'strip-markdown';
6+
7+
const filePath = process.argv[2];
8+
if (!filePath) {
9+
console.error('No file path provided.');
10+
process.exit(1);
11+
}
12+
13+
const mdx = await fs.readFile(filePath, 'utf8');
14+
const file = await remark()
15+
.use(remarkMdx)
16+
.use(strip)
17+
.process(mdx);
18+
19+
console.log(String(file));

.github/scripts/languagetool_reviewdog.py

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)