MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / S

Function S

vulnerablecode/static/js/highlight-10.6.0.min.js:141–153  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

139}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"
140}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(o),o}(e)}function j(e){
141return!!e&&(e.endsWithParent||j(e.starts))}function S(e){const t={
142props:["language","code","autodetect"],data:()=>({detectedLanguage:"",
143unknownLanguage:!1}),computed:{className(){
144return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){
145if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),
146this.unknownLanguage=!0,r(this.code);let t={}
147;return this.autoDetect?(t=e.highlightAuto(this.code),
148this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),
149this.detectedLanguage=this.language),t.value},autoDetect(){
150return!(this.language&&(e=this.autodetect,!e&&""!==e));var e},
151ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{
152class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{
153Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const P={
154"after:highlightBlock":({block:e,result:t,text:n})=>{const s=C(e)
155;if(!s.length)return;const a=document.createElement("div")
156;a.innerHTML=t.value,t.value=((e,t,n)=>{let s=0,a="";const i=[];function o(){

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected