From 4bbf220296765a20c3ba03c5351b21618a835424 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 25 Jul 2021 22:34:22 +0200 Subject: Reformated the client code a bit --- packages/client/src/components/RepositoryTreeBlob.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/client/src/components/RepositoryTreeBlob.vue') diff --git a/packages/client/src/components/RepositoryTreeBlob.vue b/packages/client/src/components/RepositoryTreeBlob.vue index 60f0506..e443287 100644 --- a/packages/client/src/components/RepositoryTreeBlob.vue +++ b/packages/client/src/components/RepositoryTreeBlob.vue @@ -49,7 +49,7 @@ export default defineComponent({ const content_blob: Ref = ref(""); const is_markdown: Ref = ref(false); - const initHighlightedContent = async() => { + async function initHighlightedContent() { const path_extension = /(?:\.([^.]+))?$/; const path_ext = path_extension.exec(props.path); @@ -64,14 +64,14 @@ export default defineComponent({ markdown.innerHTML = marked(props.content); const checkboxes = markdown.querySelectorAll("ul > li > input[type=\"checkbox\"]"); - checkboxes.forEach((checkbox) => { + checkboxes.forEach(checkbox => { if(checkbox.parentElement) { checkbox.parentElement.classList.add("checkbox-list"); } }); const codeblocks = markdown.querySelectorAll("code"); - codeblocks.forEach((codeblock) => { + codeblocks.forEach(codeblock => { codeblock.classList.add("markdown-codeblock"); }); @@ -80,7 +80,7 @@ export default defineComponent({ return; } - const language = hljs_languages.find((lang) => lang.extensions.some((extension) => ext === extension)); + const language = hljs_languages.find(lang => lang.extensions.some(extension => ext === extension)); const highlighted = language ? hljs.highlight(props.content, { language: language.name }) : hljs.highlightAuto(props.content); content_lines.value = highlighted.value.split("\n"); @@ -155,4 +155,4 @@ td:nth-child(1) { [line]::before { content: attr(line); } - + \ No newline at end of file -- cgit v1.2.3-18-g5258