add code highlighting

main
Dwsy 2 years ago committed by Redon
parent 8dab963628
commit b2977d8c44

@ -1,2 +1,2 @@
# Glob API URL # Glob API URL
VITE_GLOB_API_URL='http://20.222.29.173:3002' VITE_GLOB_API_URL='http://localhost:3002'

11
1.js

@ -1,11 +0,0 @@
// String containing code snippets
let str = "let x = 10; console.log(x);"
// Create regex pattern
let regexp = /^(?:\s{4}|\t).+/gm
// Test if any code snippets were detected
if (str.match(regexp)) {
// Code snippet was detected, do something with it
console.log(str)
}
Loading…
Cancel
Save