Skip to content

Commit

Permalink
perf: remove template string space
Browse files Browse the repository at this point in the history
  • Loading branch information
xueelf committed Nov 28, 2023
1 parent b201b64 commit a362631
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 80 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022
Copyright (c) 2022 Yuki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docsify-chat",
"version": "0.4.1",
"description": "A docsify plugin for generate chat panel from markdown",
"version": "0.4.2",
"description": "A docsify plugin for generate chat panel from markdown.",
"type": "module",
"main": "lib/docsify-chat.js",
"scripts": {
Expand All @@ -23,16 +23,16 @@
"plugin",
"chat"
],
"author": "Xue Elf <[email protected]>",
"author": "Yuki <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/dcyuki/docsify-chat/issues"
},
"homepage": "https://github.com/dcyuki/docsify-chat#readme",
"devDependencies": {
"esbuild": "^0.19.5",
"esbuild": "^0.19.8",
"sass": "^1.69.5",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"files": [
"lib"
Expand Down
148 changes: 74 additions & 74 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ function renderChat(content: string, vm: Docsify) {

raw_chat = raw_chat.replace(chat_start, chat_start_replacement);
raw_chat = raw_chat.replace(chat_end, chat_end_replacement);
raw_chat = raw_chat.replace(/(\s{2,}|\n)/g, '');
content = content.replace(chatExecs[0], raw_chat);
}
return content;
Expand Down

0 comments on commit a362631

Please sign in to comment.