Преглед изворни кода

change 'contextName' to trigger (following crowi-plus)

Yuki Takei пре 9 година
родитељ
комит
06c1023240

+ 1 - 1
packages/growi-plugin-lsx/package.json

@@ -1,6 +1,6 @@
 {
   "name": "crowi-plugin-lsx",
-  "version": "1.1.2",
+  "version": "1.2.0",
   "description": "The Crowi Plugin to add lsx tag",
   "keywords": [
     "crowi-plus",

+ 2 - 2
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPostRenderInterceptor.js

@@ -24,8 +24,8 @@ export class LsxPostRenderInterceptor extends BasicInterceptor {
    */
   isInterceptWhen(contextName) {
     return (
-      contextName === 'postRender' ||
-      contextName === 'postRenderPreview'
+      contextName === 'postRenderHtml' ||
+      contextName === 'postRenderPreviewHtml'
     );
   }
 

+ 2 - 3
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPreRenderInterceptor.js

@@ -25,8 +25,8 @@ export class LsxPreRenderInterceptor extends BasicInterceptor {
    */
   isInterceptWhen(contextName) {
     return (
-      contextName === 'preRender' ||
-      contextName === 'preRenderPreview'
+      contextName === 'preRenderHtml' ||
+      contextName === 'preRenderPreviewHtml'
     );
   }
 
@@ -38,7 +38,6 @@ export class LsxPreRenderInterceptor extends BasicInterceptor {
     const markdown = context.markdown;
     const parsedHTML = context.parsedHTML;
     const currentPagePath = context.currentPagePath;
-
     this.initializeCache(contextName);
 
     context.lsxContextMap = {};