From 82dbf972a94fc0c0910066bc17adbe7908a68082 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 8 Aug 2018 15:52:13 +0100 Subject: [PATCH] Koenig - Fix divider card text expansion no issue - re-org of the text-expansions code meant that the smart hyphens expansion was being picked up before the divider card expansion and blocking it --- .../lib/koenig-editor/addon/options/text-expansions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghost/admin/lib/koenig-editor/addon/options/text-expansions.js b/ghost/admin/lib/koenig-editor/addon/options/text-expansions.js index 7f3fdbf3e4..97b9b51e75 100644 --- a/ghost/admin/lib/koenig-editor/addon/options/text-expansions.js +++ b/ghost/admin/lib/koenig-editor/addon/options/text-expansions.js @@ -377,9 +377,6 @@ function registerInlineMarkdownTextExpansions(editor) { } export default function (editor, koenig) { - /* inline markdown -------------------------------------------------------*/ - registerInlineMarkdownTextExpansions(editor); - /* block level markdown ------------------------------------------------- */ editor.unregisterTextInputHandler('heading'); @@ -491,6 +488,12 @@ export default function (editor, koenig) { koenig.send('replaceWithCardSection', 'code', section.toRange()); } }); + + /* inline markdown -------------------------------------------------------*/ + + // must come after block expansions so that the smart hyphens expansion + // doesn't break the divider card expansion + registerInlineMarkdownTextExpansions(editor); } // TODO: reduce duplication