Skip to content

Commit

Permalink
Rename survival guide html
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Nov 29, 2024
1 parent 77e547d commit 351779f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function loadGuide(guide) {
return fetch(`${baseUrl}/guide_${guide}.md`)
.then(response => response.text())
.then(text => {
let html = toHTML(`# ${title}${guide === "tool_survival_guide" ? "\n[View survival guide online](survival_guides)\n" : ""}\n${text}`);
let html = toHTML(`# ${title}${guide === "tool_survival_guide" ? "\n[View survival guide online](survival_guide)\n" : ""}\n${text}`);
// Shift all the headers down by one h1 -> h2, h2 -> h3, etc.
html = html.replace(/<h(\d).*>(.*)<\/h(\d)>/gm, (match, p1, p2, p3) => `<h${parseInt(p1) + 1}>${p2}</h${parseInt(p1) + 1}>`);
// Resolve all images
Expand Down
File renamed without changes.

0 comments on commit 351779f

Please sign in to comment.