mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -05:00
Readd legacy pdf short code markdown it plugin (#1023)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
5b1940f0ba
commit
47f5e7653b
2 changed files with 22 additions and 0 deletions
20
cypress/integration/shortcodes.spec.ts
Normal file
20
cypress/integration/shortcodes.spec.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
describe('Short code', () => {
|
||||
beforeEach(() => {
|
||||
cy.visitTestEditor()
|
||||
})
|
||||
|
||||
describe('for pdfs', () => {
|
||||
it('renders a plain link', () => {
|
||||
cy.codemirrorFill(`{%pdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf %}`)
|
||||
cy.getMarkdownBody()
|
||||
.find('a')
|
||||
.should('have.attr', 'href', 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')
|
||||
})
|
||||
})
|
||||
})
|
|
@ -23,6 +23,7 @@ import { VimeoReplacer } from '../replace-components/vimeo/vimeo-replacer'
|
|||
import { YoutubeReplacer } from '../replace-components/youtube/youtube-replacer'
|
||||
import { BasicMarkdownItConfigurator } from './BasicMarkdownItConfigurator'
|
||||
import { quoteExtraColor } from '../markdown-it-plugins/quote-extra-color'
|
||||
import { legacyPdfShortCode } from '../regex-plugins/replace-legacy-pdf-short-code'
|
||||
|
||||
export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
|
||||
constructor(
|
||||
|
@ -54,6 +55,7 @@ export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
|
|||
YoutubeReplacer.markdownItPlugin,
|
||||
VimeoReplacer.markdownItPlugin,
|
||||
GistReplacer.markdownItPlugin,
|
||||
legacyPdfShortCode,
|
||||
legacySlideshareShortCode,
|
||||
legacySpeakerdeckShortCode,
|
||||
AsciinemaReplacer.markdownItPlugin,
|
||||
|
|
Loading…
Reference in a new issue