This website works better with JavaScript.
首頁
探索
帮助
返回水杉在线
登录水杉在线
登录水杉码园
wlxsp
/
test1
關註
1
收藏
0
複製
0
程式碼
問題管理
0
合併請求
0
版本發佈
0
Wiki
Activity
瀏覽代碼
Adds base64 function
main
Eric Amodio
5 年之前
父節點
3ed0ea195f
當前提交
e3d7590c11
共有
1 個文件被更改
,包括
5 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
src/system/string.ts
+ 5
- 0
src/system/string.ts
查看文件
@ -15,6 +15,11 @@ export namespace Strings {
Backslash
=
92
}
export
function
base64
(
s
:
string
)
:
string
{
const
buffer
=
Buffer
.
from
(
s
)
;
return
buffer
.
toString
(
'base64'
)
;
}
const
escapeMarkdownRegex
=
/[\\`*_{}[\]()#+\-.!]/g
;
const
escapeMarkdownHeaderRegex
=
/^===/gm
;
// const sampleMarkdown = '## message `not code` *not important* _no underline_ \n> don\'t quote me \n- don\'t list me \n+ don\'t list me \n1. don\'t list me \nnot h1 \n=== \nnot h2 \n---\n***\n---\n___';
Write
Preview
Loading…
取消
儲存