Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed May 14, 2024
1 parent 0123def commit 58137a7
Show file tree
Hide file tree
Showing 160 changed files with 21,396 additions and 66 deletions.
110 changes: 110 additions & 0 deletions articles/demo.md
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)
37 changes: 0 additions & 37 deletions articles/others/markdown.md

This file was deleted.

1 change: 1 addition & 0 deletions cpl/cplusplus.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ base + sizeof * 偏移量,数组指针好像就是这样的,用*(a+b)访
- [Software optimization resources,涉及很多底层的技术和文档,值得去看看](https://www.agner.org/optimize/#manuals)
- [Calling conventions for different C++ compilers and operating systems](https://www.agner.org/optimize/calling_conventions.pdf),更新到2023年的技术
- [微软出品C++下一代的多态Proxy: Next Generation Polymorphism in C++](https://github.com/microsoft/proxy)
- [反射库refl-cpp is a header-only library which provides compile-time reflection and introspection capabilities to C++](https://github.com/veselink1/refl-cpp)
### 工具
Expand Down
36 changes: 24 additions & 12 deletions cpl/js/regularExpressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
2 changes: 1 addition & 1 deletion dev-note/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# dev-note

- [nodejs包管理](/web/pkg.md)
- [git](/dev-note/git.md)
- [cmake](/dev-note/cmake.md)
- [linux](/dev-note/linux.md)
Expand All @@ -11,7 +12,6 @@
- [build System](/dev-note/buildSystem.md)
- [debug](/dev-note/debug.md)
- [powershell](/dev-note/powershell.md)
- [nodejs包管理](/web/pkg.md)
- [包管理C++](/dev-note/pkg.md)
- [maven](/dev-note/maven.md)

Expand Down
2 changes: 1 addition & 1 deletion html/mathjax.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ window.MathJax = {
(function () {
var script = document.createElement('script');
script.id = 'MathJax-script';
script.src = './es5/tex-chtml-full.js';
script.src = '../libs/mathjax.es5/tex-chtml-full.js';
script.async = true;
document.head.appendChild(script);
})();
2 changes: 1 addition & 1 deletion html/pinyin.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Depth to View</title>
<script src="./html.config.js" defer></script>
<script src="./third/pinyin-pro.js" defer></script>
<script src="../libs/pinyin-pro.js" defer></script>
</script>
<style>
/* css */
Expand Down
9 changes: 8 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ body {
}
}

#content pre {
overflow: unset;
}
em {
font-style: normal;
font-weight: bolder;
Expand All @@ -53,4 +56,8 @@ em {
right: 0;
margin-right: 10px;
margin-top: 10px;
}
}
/* chrome浏览器的滚动条大小 */
::-webkit-scrollbar {
width: 2px !important;
}
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<!DOCTYPE html>
<!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="./bootstrap-5.0.2-dist/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./index.css">
<script src="./marked.v4.3.0.min.js"></script>
<script src="./bootstrap-5.0.2-dist/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="./highlight/styles/default.min.css">
<link rel="stylesheet" type="text/css" href="./highlight/styles/xcode.min.css">
<link rel="stylesheet" type="text/css" href="./libs/marked/katex.min.css">
<title>lmj01 document</title>
</head>
<body class="mj-body">
Expand Down
11 changes: 7 additions & 4 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {} from './marked.v4.3.0.min.js';
import { md2Html } from './libs/marked/mj-marked.mjs';
import hljs from './highlight/core.min.mjs';
import languageJavascript from './highlight/languages/javascript.min.mjs';
import languageLua from './highlight/languages/lua.min.mjs';
Expand All @@ -14,7 +14,7 @@ const ud = {
cacheUrls: [],
};
// 测试
document.getElementById('content').innerHTML = marked.parse('# Marked in the browser\n\nRendered by **marked**.');
document.getElementById('content').innerHTML = md2Html('# Marked in the browser\n\nRendered by **marked**.');
const elBtnBack = document.createElement('button');
elBtnBack.classList.add('btn', 'btn-primary', 'mj-navigate-btn');
elBtnBack.textContent = 'Back';
Expand Down Expand Up @@ -51,7 +51,7 @@ function updateContent(text, options = {}) {
if (ext == 'md') {
const elDiv = document.createElement('div');
elDiv.classList.add('w-100','h-100','d-flex','flex-column');
elDiv.innerHTML = marked.parse(text);
elDiv.innerHTML = md2Html(text);
elContent.replaceChildren();
elContent.appendChild(elDiv);
} else {
Expand Down Expand Up @@ -98,4 +98,7 @@ function tagLinkUpdateEvent(aLink) {

// 获取所有
ud.cacheUrls = [];
document.querySelectorAll('.side-menu a').forEach(a => tagLinkUpdateEvent(a));
document.querySelectorAll('.side-menu a').forEach(a => tagLinkUpdateEvent(a));
fetch('/articles/demo.md').then(res=>res.text()).then(text=>{
document.getElementById('content').innerHTML = md2Html(text);
})
6 changes: 6 additions & 0 deletions index/book-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
### [The Nurbs Book](https://book.douban.com/subject/3989660/)
[记录](/cg/mesh/NURBS)

### [金字塔原理丛书](https://book.douban.com/subject/25935981/)
- MECE(发音:me see)分析法是 Mutually Exclusive Collectively Exhaustive的首字母缩写词,中文意思是"相互独立、完全穷尽",即所谓的 "无重复、无遗漏"。


## readed
- 计算机图形图像设计,2016,中国传媒大学出版社,已读
- 囚徒的困境-冯·诺依曼、博弈论和原子弹之谜,已读
Expand All @@ -62,6 +66,8 @@
- [Algorithmica is an open-access web book dedicated to the art and science of computing.](https://en.algorithmica.org/)
- [github](https://github.com/algorithmica-org/algorithmica)
- [The Software Foundations series is a broad introduction to the mathematical underpinnings of reliable software.可在线可下载,适合博士或研究资料](https://softwarefoundations.cis.upenn.edu/)
- [清华邓俊辉两门课,数据结构和计算几何](https://dsa.cs.tsinghua.edu.cn/~deng/index.htm)


### github resource

Expand Down
Binary file added libs/marked/fonts/KaTeX_AMS-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_AMS-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_AMS-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Bold.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Bold.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Bold.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Caligraphic-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Bold.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Bold.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Bold.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Fraktur-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Bold.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Bold.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Bold.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-BoldItalic.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-BoldItalic.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-BoldItalic.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Italic.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Italic.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Italic.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Main-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-BoldItalic.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-BoldItalic.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-BoldItalic.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-Italic.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-Italic.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Math-Italic.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Bold.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Bold.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Bold.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Italic.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Italic.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Italic.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_SansSerif-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Script-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Script-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Script-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size1-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size1-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size1-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size2-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size2-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size2-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size3-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size3-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size3-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size4-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size4-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Size4-Regular.woff2
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Typewriter-Regular.ttf
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Typewriter-Regular.woff
Binary file not shown.
Binary file added libs/marked/fonts/KaTeX_Typewriter-Regular.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions libs/marked/katex.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 58137a7

Please sign in to comment.