diff options
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 |