mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 14:25:32 +01:00
[Misc/Docs] Fix Typedoc workflow to not break the "go to main" link (#6502)
* Fixed missing `img src=`
This commit is contained in:
parent
f29bfa31cd
commit
b5124ae3ce
@ -19,15 +19,10 @@ export function load(app) {
|
|||||||
app.renderer.on(Renderer.EVENT_END_PAGE, page => {
|
app.renderer.on(Renderer.EVENT_END_PAGE, page => {
|
||||||
if (page.pageKind === PageKind.Index && page.contents) {
|
if (page.pageKind === PageKind.Index && page.contents) {
|
||||||
page.contents = page.contents
|
page.contents = page.contents
|
||||||
// Replace links to the beta documentation site with the current ref name
|
// Replace the SVG to the beta documentation site with the current ref name
|
||||||
.replace(
|
.replace(
|
||||||
/href="(.*pagefaultgames.github.io\/pokerogue\/).*?"/, // formatting
|
/^<a href="(.*?)\/beta(.*?)"><img src=".*coverage.svg"/m, // formatting
|
||||||
`href="$1/${process.env.REF_NAME}"`,
|
`<a href="$1/${process.env.REF_NAME}$2"><img src="coverage.svg"`,
|
||||||
)
|
|
||||||
// Replace the link to Beta's coverage SVG with the SVG file for the branch in question.
|
|
||||||
.replace(
|
|
||||||
/img src=".*?coverage.svg/, // formatting
|
|
||||||
`img src="coverage.svg"`,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user