diff --git a/mods/core/css/menu.css b/mods/core/css/menu.css index 8eea81a..019b43d 100644 --- a/mods/core/css/menu.css +++ b/mods/core/css/menu.css @@ -83,6 +83,9 @@ code { u { text-decoration: underline; } +s { + text-decoration: line-through; +} /* titlebar */ @@ -188,22 +191,29 @@ u { margin: 0.3em 0 0.4em 0; font-size: 0.9em; } +#modules section .desc p { + margin: 0; +} +#modules section .desc blockquote { + margin: 0.3em 0; + border-left: 0.3em solid var(--theme_local--table-border); + padding-left: 0.7em; +} + #modules section .desc a { color: currentColor; text-decoration: underline dotted; } -#modules section .desc s { - text-decoration: line-through; -} + #modules section .desc img { width: 100%; max-width: 20em; margin: 0.5em 0; } -#modules section .desc img:first-child { +#modules section .desc :first-child img:first-child { margin-top: 0; } -#modules section .desc img:last-child { +#modules section .desc :last-child img:last-child { margin-bottom: 0; } diff --git a/mods/core/menu.js b/mods/core/menu.js index 739f2dc..4ad2b65 100644 --- a/mods/core/menu.js +++ b/mods/core/menu.js @@ -110,36 +110,43 @@ window['__start'] = async () => { // mod options function markdown(string) { - return string + const parsed = string .split('\n') .map((line) => line // todo: stop e.g. whole chunk of ~~thin~~g~~ being selected .trim() + .replace(/\s+/g, ' ') + // > quote + .replace(/^>\s+(.+)$/g, '
$1') // ~~strikethrough~~ - .replace(/([^\\])?~~([^\n]*[^\\])~~/g, '$1
$2
')
+ .replace(/([^\\])?`([^`]*[^\\`])`/g, '$1$2
')
// 
.replace(
- /([^\\])?\!\[([^\n]*[^\\]?)\]\(([^\n]*[^\\])\)/g,
- '$1') ? line : `${line}
` + ) + .join(''); + return parsed; } const $modules = document.querySelector('#modules'); for (let mod of modules.loaded.sort((a, b) => { @@ -176,7 +183,7 @@ window['__start'] = async () => { -${markdown(mod.desc)}
+${markdown(mod.desc)}