mirror of
https://github.com/public-apis/public-apis.git
synced 2025-05-24 22:46:19 +02:00
Trim Markdown Go! out of Link string
This commit is contained in:
parent
264917a905
commit
22591456e8
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
|||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue