Styled note template
Fixed link regex Fixed pre width Squashed commit of the following: commit20038e290aAuthor: wholteza <zackarias@montell.se> Date: Sat Sep 20 20:55:21 2025 +0200 Fix width of pre element commit52b49e18a2Author: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:59:36 2025 +0200 Fix link regexp commit5036b3bca6Author: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:53:00 2025 +0200 Changed font size commit5063c088ebAuthor: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:52:22 2025 +0200 Fixed margins commitacd6ed63e1Author: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:51:03 2025 +0200 Add leading space to links commit8b3c7871abAuthor: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:50:38 2025 +0200 Add color to links commit2658d688caAuthor: wholteza <zackarias@montell.se> Date: Sat Sep 20 18:45:49 2025 +0200 Fixed reloading of browser when developing commit03e2361798Author: wholteza <zackarias@montell.se> Date: Fri Sep 19 21:45:40 2025 +0200 Change header line height commita1f6994c02Author: wholteza <zackarias@montell.se> Date: Fri Sep 19 21:42:08 2025 +0200 Align note with index
This commit is contained in:
@@ -304,9 +304,10 @@ class Link extends Symbol {
|
||||
/**
|
||||
* @type {RegExp}
|
||||
*/
|
||||
static textAndLinkRegExp: RegExp = new RegExp(
|
||||
/\[(?<text>.*)\]\((?<link>.*)\)/
|
||||
);
|
||||
static textAndLinkRegExp: RegExp = new RegExp
|
||||
(
|
||||
/\[(?<text>[^\]]+)\]\((?<link>[^)]+)\)/
|
||||
);
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -350,7 +351,8 @@ class Link extends Symbol {
|
||||
}
|
||||
|
||||
render() {
|
||||
return `<a href="${this.link}">${this.text}</a>`;
|
||||
// TODO: This leading space should probably be somewhere else.
|
||||
return ` <a href="${this.link}">${this.text}</a>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -899,7 +901,7 @@ export const toHtml = (markdown: string, assetDirectory: string): string => {
|
||||
// .filter((s) => !(s instanceof JustALineBreak))
|
||||
.map((s) => s.render())
|
||||
.join("");
|
||||
return `<div>${html}</div>`;
|
||||
return `<div class="content">${html}</div>`;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ export class StartPagePlugin implements IPluginBuilder {
|
||||
${links.join("")}
|
||||
`;
|
||||
htmlTemplate = htmlTemplate.replace("{{content}}", html);
|
||||
console.log("Generating index", this.options.indexTemplatePath);
|
||||
writeTextAsFile(
|
||||
`${builderContext.outputDirectory}/index.html`,
|
||||
htmlTemplate
|
||||
|
||||
Reference in New Issue
Block a user