Skip to content

Commit

Permalink
Fix directive plugin: Inspect token type for paginating
Browse files Browse the repository at this point in the history
In the inline SVG mode, the token that stored directives would not be
with marpitSlideElement meta.
  • Loading branch information
yhatt committed Sep 11, 2023
1 parent 5975584 commit 9b975d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/markdown/directives/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
!(
Expand Down

0 comments on commit 9b975d3

Please sign in to comment.