Refactor video-util.ts and rename markdown-preview (#233)

* Refactor video-util.ts
* Rename markdown-preview to markdown-renderer and refactor some methods

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
mrdrogdrog 2020-06-20 21:05:24 +02:00 committed by GitHub
parent 5f4cc63eb4
commit 7e9a828d44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 51 additions and 39 deletions

View file

@ -0,0 +1,11 @@
import { RegexOptions } from '../../../../external-types/markdown-it-regex/interface'
const finalRegex = /^{%slideshare (\w+\/[\w-]+) ?%}$/
export const replaceLegacySlideshareShortCode: RegexOptions = {
name: 'legacy-slideshare-short-code',
regex: finalRegex,
replace: (match) => {
return `<a target="_blank" rel="noopener noreferrer" href="https://www.slideshare.net/${match}">https://www.slideshare.net/${match}</a>`
}
}