Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
22591456
Commit
22591456
authored
May 25, 2017
by
Dave Machado
Browse files
Trim Markdown Go! out of Link string
parent
264917a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
build/md2json.js
View file @
22591456
fs
=
require
(
'
fs
'
)
function
md_trim
(
str
)
{
return
str
.
replace
(
/
(
^
\s
+
)
|
(\s
+$
)
/g
,
""
);
str
=
str
.
replace
(
/
(
^
\s
+
)
|
(\s
+$
)
/g
,
""
);
if
(
str
.
lastIndexOf
(
"
[Go!]
"
,
0
)
===
0
)
{
str
=
str
.
replace
(
"
[Go!]
"
,
""
).
slice
(
1
,
-
1
);
}
return
str
;
}
function
handle
(
filename
,
anchor
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment