diff --git a/src/webviews/src/assets/index.css b/src/webviews/src/assets/index.css index 7c63b087..d3d7d436 100644 --- a/src/webviews/src/assets/index.css +++ b/src/webviews/src/assets/index.css @@ -60,7 +60,7 @@ } & > span[class*='hljs-']:first-of-type { - @apply relative + @apply relative; } } diff --git a/src/webviews/src/components/PatchDetail.vue b/src/webviews/src/components/PatchDetail.vue index 97f1f358..9ef38436 100644 --- a/src/webviews/src/components/PatchDetail.vue +++ b/src/webviews/src/components/PatchDetail.vue @@ -82,20 +82,22 @@ function checkOutDefaultBranch() { } onMounted(() => { - nextTick(()=>{ + nextTick(() => { console.info('mounted') - document.querySelectorAll("code.hljs[class*='language-']").forEach((highlightedCodeEl)=> { + document.querySelectorAll("code.hljs[class*='language-']").forEach((highlightedCodeEl) => { const highlightedCodeElClass = highlightedCodeEl.classList.value const langTagEl = document.createElement('span') - langTagEl.textContent = highlightedCodeElClass.replace('hljs ', '').replaceAll(/language-/g,'').trim() + langTagEl.textContent = highlightedCodeElClass + .replace('hljs ', '') + .replaceAll(/language-/g, '') + .trim() langTagEl.classList.add('langTag') highlightedCodeEl.insertBefore(langTagEl, highlightedCodeEl.firstChild) console.info('inserted') - } - ) + }) }) })