mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:03:09 +02:00
Fix code style
This commit is contained in:
parent
aac519bf80
commit
33d79420eb
1 changed files with 4 additions and 2 deletions
|
@ -157,12 +157,14 @@ export const mfmLanguage = P.createLanguage({
|
|||
let url: string;
|
||||
if (!match) {
|
||||
const match = text.match(/^<(https?:\/\/.*?)>/);
|
||||
if (!match)
|
||||
if (!match) {
|
||||
return P.makeFailure(i, 'not a url');
|
||||
}
|
||||
url = match[1];
|
||||
i += 2;
|
||||
} else
|
||||
} else {
|
||||
url = match[0];
|
||||
}
|
||||
url = removeOrphanedBrackets(url);
|
||||
while (url.endsWith('.') || url.endsWith(',')) {
|
||||
if (url.endsWith('.')) url = url.substr(0, url.lastIndexOf('.'));
|
||||
|
|
Loading…
Reference in a new issue