Skip to content

Commit

Permalink
add code highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwsy authored and Chanzhaoyu committed Feb 15, 2023
1 parent 79dd6c5 commit 8dab963
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Glob API URL
VITE_GLOB_API_URL='http:https://localhost:3002'
VITE_GLOB_API_URL='http:https://20.222.29.173:3002'
11 changes: 11 additions & 0 deletions 1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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)
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"common:prepare": "husky install"
},
"dependencies": {
"highlight.js": "^11.7.0",
"naive-ui": "^2.34.3",
"pinia": "^2.0.30",
"vue": "^3.2.47",
Expand Down
Loading

0 comments on commit 8dab963

Please sign in to comment.