This website works better with JavaScript.
Home
Explore
帮助
返回水杉在线
登录水杉在线
登录水杉码园
wlxsp
/
test1
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Adds base64 function
main
Eric Amodio
5 years ago
parent
3ed0ea195f
commit
e3d7590c11
1 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
src/system/string.ts
+ 5
- 0
src/system/string.ts
View File
@ -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…
Cancel
Save