diff options
author | HampusM <hampus@hampusmat.com> | 2021-07-25 22:34:22 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-07-25 22:34:22 +0200 |
commit | 4bbf220296765a20c3ba03c5351b21618a835424 (patch) | |
tree | da6b685a7496bceb928d397f5a073edf1083af44 /packages/client/src/components/RepositoryTreeBlob.vue | |
parent | 7d27f9c7f1b57693dfdc0dd289015406b90984ec (diff) |
Reformated the client code a bit
Diffstat (limited to 'packages/client/src/components/RepositoryTreeBlob.vue')
-rw-r--r-- | packages/client/src/components/RepositoryTreeBlob.vue | 10 |
1 files changed, 5 insertions, 5 deletions
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<string> = ref(""); const is_markdown: Ref<boolean> = 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); } -</style> +</style>
\ No newline at end of file |