Fixed raw text and lisp

This commit is contained in:
Simon Cambier 2024-06-22 10:13:19 +02:00
parent ed2fd9f45e
commit 0d61c7662a
3 changed files with 2199 additions and 1647 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,9 +13,7 @@
{@html htmlContent}
</div>
{:else if isPlainText}
<div class="whitespace-pre-line h-full">
{decompressed}
</div>
<pre class="h-full">{decompressed}</pre>
{:else}
<pre class="h-full"><code>{@html htmlContent}</code></pre>
{/if}

View File

@ -44,12 +44,16 @@
$: {
if (editor) {
languages = CodeMirror.modeInfo
.map((e: any) => ({
text: e.name,
value: shorten(e.name),
data: { mime: e.mime, mode: e.mode },
}))
languages = (CodeMirror.modeInfo as unknown[])
.map((e: any) => {
let name = e.name
if (name === 'Common Lisp') name = 'Lisp'
return {
text: name,
value: shorten(name),
data: { mime: e.mime, mode: e.mode },
}
})
.filter((l: any) => l.value !== 'gflm') // Remove github flavored markdown, redundant with markdown
selectedLanguage =