-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
160 changed files
with
21,396 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# markdown demo | ||
> markdown渲染成HTML的插件 | ||
|
||
```js | ||
function func(a, b) { | ||
return a + b | ||
} | ||
``` | ||
|
||
## [katex](https://katex.org/) | ||
|
||
- [js katex api ](https://katex.org/docs/api) | ||
- [支持格式](https://katex.org/docs/support_table) | ||
|
||
$$ | ||
a^2=b^2+c^2 | ||
$$ | ||
|
||
This is inline katex: | ||
|
||
$ c = \\pm\\sqrt{ a^2 + b^2 } $ | ||
|
||
This is block level katex: | ||
|
||
$$ | ||
c = \\pm\\sqrt{a^2 + b^2} | ||
$$ | ||
|
||
$$ | ||
\\begin{array}{cc} | ||
a & b \\\\ | ||
c & d | ||
\\end{array} | ||
$$ | ||
|
||
$$ | ||
\\begin{array}{cc} | ||
1 & 2 & 3 \\\\ | ||
4 & 5 & 6 \\\\ | ||
7 & 8 & 9 | ||
\\end{array} | ||
$$ | ||
|
||
[maths symbols for latex](https://mirrors.jlu.edu.cn/CTAN/info/symbols/math/maths-symbols.pdf) | ||
|
||
## [alert](https://github.com/bent10/marked-extensions/tree/main/packages/alert) | ||
- [Enables GFM alerts](https://github.com/orgs/community/discussions/16925) | ||
|
||
> [!NOTE] | ||
> Highlights information that users should take into account, even when skimming. | ||
> [!TIP] | ||
> Optional information to help a user be more successful. | ||
> [!IMPORTANT] | ||
> Crucial information necessary for users to succeed. | ||
> [!WARNING] | ||
> Critical content demanding immediate user attention due to potential risks. | ||
> [!CAUTION] | ||
> Negative potential consequences of an action. | ||
> **Note** | ||
> This is a note | ||
> **Warning** | ||
> This is a warning | ||
## table | ||
|
||
- **table one** | ||
|
||
| This header spans two || Header A | | ||
| columns *and* two rows ^|| Header B | | ||
|-------------|------------|----------| | ||
| Cell A | Cell B | Cell C | | ||
|
||
- **table two** | ||
|
||
| H1 | H2 | | ||
|--------------|---------| | ||
| This cell | Cell A | | ||
| spans three ^| Cell B | | ||
| rows ^| Cell C | | ||
|
||
- table three | ||
|
||
| H1 | H2 | H3 | | ||
|---------|---------|---------| | ||
| This cell spans 3 columns ||| | ||
|
||
- table four | ||
|
||
| Syntax | Description | Test Text | | ||
| :--- | :----: | ---: | | ||
| Header | Title | Here's this | | ||
| Paragraph | Text | And more | | ||
|
||
|
||
## 其他 | ||
|
||
- [A WYSIWYG Markdown editor, improve reading and editing experience. and generate your Markdown files into online documents in the easiest and fastest way一个所见即所得的 Markdown 桌面编辑器,集成了 Mermaid 图形与 Katex 公式,支持明亮和暗黑风格。](https://github.com/1943time/bluestone) | ||
|
||
[Marked Documentation](https://marked.js.org/) | ||
|
||
- [marked github](https://github.com/markedjs/marked) | ||
- [demo可下载发布后的文件](https://marked.js.org/demo/) | ||
- [marked插件 github](https://github.com/bent10/marked-extensions) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,26 @@ const re4 = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i; | |
* @deprecated RegExp.$1这种方式已经废弃了 | ||
*/ | ||
const re4a = /(\w+)@(\w+)\.(\w+)(\.\w+)?/i; | ||
// 匹配特殊字符 | ||
const re5 = /[$]+/g; // 匹配一次 | ||
const re5a = /[$]{2,4}/g; // 匹配一次 | ||
const re5b = /\$\${2,}/g; // 匹配一次 | ||
|
||
// let str1 = 'abc123'; | ||
// console.log(1, 'match', '1', str1.match(re1), '2', str1.match(re2)); | ||
// console.log(2, 'replace', '1', str1.replace(re1,''), '2', str1.replace(re2, '')); | ||
|
||
let str3 = '我得数字1', str3a = '11汉字', str3b = '11汉字aa', str3c = 'bb11汉字aa'; | ||
console.log(3, re3.test(str3), str3.match(re3), re3.test(str3a), str3a.match(re3)) | ||
if (re3a.test(str3)) { | ||
console.log(3, RegExp.$1, RegExp.$2); | ||
} | ||
if (re3a.test(str3a)) { | ||
console.log('3a',RegExp.$1, RegExp.$2); | ||
} | ||
console.log('3b', str3.replace(re3b, ''), str3a.replace(re3b,'')); | ||
console.log('3b', str3b.replace(re3c, ''), str3b.replace(re3c,'')); | ||
console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); | ||
// let str3 = '我得数字1', str3a = '11汉字', str3b = '11汉字aa', str3c = 'bb11汉字aa'; | ||
// console.log(3, re3.test(str3), str3.match(re3), re3.test(str3a), str3a.match(re3)) | ||
// if (re3a.test(str3)) { | ||
// console.log(3, RegExp.$1, RegExp.$2); | ||
// } | ||
// if (re3a.test(str3a)) { | ||
// console.log('3a',RegExp.$1, RegExp.$2); | ||
// } | ||
// console.log('3b', str3.replace(re3b, ''), str3a.replace(re3b,'')); | ||
// console.log('3b', str3b.replace(re3c, ''), str3b.replace(re3c,'')); | ||
// console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); | ||
|
||
// let str4 = '[email protected]', str4a = 'a.b.com'; | ||
// console.log(4, str4.match(re4), str4a.match(re4)); | ||
|
@@ -37,4 +41,12 @@ console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); | |
// } | ||
// if (re4a.test(str4a)) { | ||
// console.log('4a2', RegExp.$1, RegExp.$2, RegExp.$3); | ||
// } | ||
// } | ||
|
||
let str5 = '$a=b+c$', str5a = `$$ | ||
a = b + c; | ||
$$`; | ||
console.log(5, re5.test(str5), re5a.test(str5), re5b.test(str5)); | ||
console.log('5a', re5.test(str5a), re5a.test(str5a), re5b.test(str5a)); | ||
console.log('5b', str5.match(re5), str5.match(re5a), str5.match(re5b)); | ||
console.log('5b1', str5a.match(re5), str5a.match(re5a), str5a.match(re5b)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.