mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-28 16:27:29 +01:00
website/Reference: really fix the eslint error :D
This commit is contained in:
parent
cd1e4a74ed
commit
e8dca3ce7d
@ -11,8 +11,7 @@ import parse_sections from "./lib/parse_sections.mjs";
|
|||||||
// HACK: Make sure __dirname is defined when using es6 modules. I forget where I found this - a PR with a source URL would be great!
|
// HACK: Make sure __dirname is defined when using es6 modules. I forget where I found this - a PR with a source URL would be great!
|
||||||
const __dirname = import.meta.url.slice(7, import.meta.url.lastIndexOf("/"));
|
const __dirname = import.meta.url.slice(7, import.meta.url.lastIndexOf("/"));
|
||||||
|
|
||||||
// eslint-disable-next-line prefer-const
|
const { sections, categories } = parse_sections(fs.readFileSync(
|
||||||
let { sections, categories } = parse_sections(fs.readFileSync(
|
|
||||||
path.resolve(
|
path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
`../Chat-Command-Reference.md`
|
`../Chat-Command-Reference.md`
|
||||||
@ -20,7 +19,7 @@ let { sections, categories } = parse_sections(fs.readFileSync(
|
|||||||
"utf-8"
|
"utf-8"
|
||||||
))
|
))
|
||||||
|
|
||||||
sections = sections.sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare(
|
sections.sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare(
|
||||||
b.title.replace(/^\/+/g, "")));
|
b.title.replace(/^\/+/g, "")));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user