aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/components/RepositoryTreeBlob.vue
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-07-25 22:34:22 +0200
committerHampusM <hampus@hampusmat.com>2021-07-25 22:34:22 +0200
commit4bbf220296765a20c3ba03c5351b21618a835424 (patch)
treeda6b685a7496bceb928d397f5a073edf1083af44 /packages/client/src/components/RepositoryTreeBlob.vue
parent7d27f9c7f1b57693dfdc0dd289015406b90984ec (diff)
Reformated the client code a bit
Diffstat (limited to 'packages/client/src/components/RepositoryTreeBlob.vue')
-rw-r--r--packages/client/src/components/RepositoryTreeBlob.vue10
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