From 9b975d375fc383bf312f8b04ee13c9c2cf881439 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 12 Sep 2023 00:54:01 +0900 Subject: [PATCH] Fix directive plugin: Inspect token type for paginating In the inline SVG mode, the token that stored directives would not be with marpitSlideElement meta. --- src/markdown/directives/apply.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/markdown/directives/apply.js b/src/markdown/directives/apply.js index 8aef4f6..e6f224d 100644 --- a/src/markdown/directives/apply.js +++ b/src/markdown/directives/apply.js @@ -39,9 +39,9 @@ function _apply(md, opts = {}) { const tokensForPaginationTotal = [] for (const token of state.tokens) { - const { marpitDirectives, marpitSlideElement } = token.meta || {} + const { marpitDirectives } = token.meta || {} - if (marpitSlideElement === 1) { + if (token.type === 'marpit_slide_open') { // `skip` and `hold` disable increment of the page number if ( !(