Apply suggestion to src/commands/mdn.ts

merge-requests/7/head
Bsian 2020-05-20 06:49:07 -04:00
parent cd86c3f7ee
commit d71a159054
1 changed files with 2 additions and 4 deletions

View File

@ -33,10 +33,8 @@ export default class MDN extends Command {
// Do not touch to the next block of code. Don't even look at it. your brain could stop working // Do not touch to the next block of code. Don't even look at it. your brain could stop working
data.Summary = data.Summary.replace(/<code><strong>/g, '<strong><code>'); data.Summary = data.Summary.replace(/<code><strong>/g, '<strong><code>');
data.Summary = data.Summary.replace(/<\/strong><\/code>/g, '</code></strong>'); data.Summary = data.Summary.replace(/<\/strong><\/code>/g, '</code></strong>');
data.Summary = data.Summary.replace(/<code>/g, '`'); data.Summary = data.Summary.replace(/<code>|<\/code>/g, '`');
data.Summary = data.Summary.replace(/<\/code>/g, '`'); data.Summary = data.Summary.replace(`/<strong>|<\/strong>/g, '**');`
data.Summary = data.Summary.replace(/<strong>/g, '**');
data.Summary = data.Summary.replace(/<\/strong>/g, '**');
const url = data.Summary.match(/<a href=.*>/); const url = data.Summary.match(/<a href=.*>/);
if (url !== null) { if (url !== null) {
url[0] = url[0].replace('<a href="', ''); url[0] = url[0].replace('<a href="', '');