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} {@html htmlContent}
</div> </div>
{:else if isPlainText} {:else if isPlainText}
<div class="whitespace-pre-line h-full"> <pre class="h-full">{decompressed}</pre>
{decompressed}
</div>
{:else} {:else}
<pre class="h-full"><code>{@html htmlContent}</code></pre> <pre class="h-full"><code>{@html htmlContent}</code></pre>
{/if} {/if}

View File

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