diff --git a/static/js/lib/ckeditor/plugins/ResourceLinkMarkdownSyntax.ts b/static/js/lib/ckeditor/plugins/ResourceLinkMarkdownSyntax.ts index 3b5bc612b..ad32956d3 100644 --- a/static/js/lib/ckeditor/plugins/ResourceLinkMarkdownSyntax.ts +++ b/static/js/lib/ckeditor/plugins/ResourceLinkMarkdownSyntax.ts @@ -10,6 +10,16 @@ import { RESOURCE_LINK } from "@mitodl/ckeditor5-resource-link/src/constants" +export const RESOURCE_LINK_SHORTCODE_REGEX = /{{< resource_link (\S+) "(.*?)" >}}/g +/** + * (\S+) to match and capture the UUID + * "(.*?)" to match and capture the label text + * + * Limitations: + * - gets fooled by label texts that include literal `" >}}` values. For + * example, < resource_link uuid123 "silly " >}} link" >}}. + */ + /** * Class for defining Markdown conversion rules for Resource links * @@ -25,17 +35,6 @@ import { * The ResourceEmbed plugin itself is provided via our fork of CKEditor's * 'link' plugin. */ - -export const RESOURCE_LINK_SHORTCODE_REGEX = /{{< resource_link (\S+) "(.*?)" >}}/g -/** - * (\S+) to match and capture the UUID - * "(.*?)" to match and capture the label text - * - * Limitations: - * - gets fooled by label texts that include literal `" >}}` values. For - * example, < resource_link uuid123 "silly " >}} link" >}}. - */ - export default class ResourceLinkMarkdownSyntax extends MarkdownSyntaxPlugin { constructor(editor: editor.Editor) { super(editor)