Skip to content

「2. Step2」が「1. Step2」と出力されることがある #169

Description

@makoto-soracom

Issue Details

Vivliostyle で以下のように書いた md から Preview を見たり PDF を作成すると、Step2 に対して value="1" が設定されるため、2 ではなく 1 と表示されます。

1. Step1

    - Bullet1

2. Step2
  • VFM version
    • 2.1.0
  • Node.js version
    • 16.16.1

Expected Behavior

Step2 が、「2. Step2」と表示される。

Actual Behavior

Step2 が、「1. Step2」と表示される。

Debug log (Any)

Run vfm with DEBUG=vfm to see detailed log.

DEBUG=vfm vfm TEST.md

上記のコマンドではどういうわけか問題がありません。

  vfm 
  vfm ### mdast ### +0ms
  vfm root[1]
  vfm └─0 list[2]
  vfm     │ ordered: true
  vfm     │ start: 1
  vfm     │ spread: true
  vfm     ├─0 listItem[2]
  vfm     │   │ spread: true
  vfm     │   │ checked: null
  vfm     │   ├─0 paragraph[1]
  vfm     │   │   └─0 text "Step1"
  vfm     │   └─1 list[1]
  vfm     │       │ ordered: false
  vfm     │       │ start: null
  vfm     │       │ spread: false
  vfm     │       └─0 listItem[1]
  vfm     │           │ spread: false
  vfm     │           │ checked: null
  vfm     │           └─0 paragraph[1]
  vfm     │               └─0 text "Bullet1"
  vfm     └─1 listItem[1]
  vfm         │ spread: false
  vfm         │ checked: null
  vfm         └─0 paragraph[1]
  vfm             └─0 text "Step2" +2ms
  vfm 
  vfm ### hast ### +8ms
  vfm root[1]
  vfm │ data: {"quirksMode":false}
  vfm └─0 element<ol>[5]
  vfm     │ properties: {}
  vfm     ├─0 text "\n"
  vfm     ├─1 element<li>[5]
  vfm     │   │ properties: {}
  vfm     │   ├─0 text "\n"
  vfm     │   ├─1 element<p>[1]
  vfm     │   │   │ properties: {}
  vfm     │   │   └─0 text "Step1"
  vfm     │   ├─2 text "\n"
  vfm     │   ├─3 element<ul>[3]
  vfm     │   │   │ properties: {}
  vfm     │   │   ├─0 text "\n"
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <ol>
      <li>
        <p>Step1</p>
        <ul>
          <li>Bullet1</li>
        </ul>
      </li>
      <li>
        <p>Step2</p>
      </li>
    </ol>
  </body>
</html>

Screenshots (Any)

If applicable, add screenshots to help explain your problem.

image

To Reproduce

Steps to reproduce the behavior:

上記の markdown で PDF を作成するとスクリーンショットのようになります。

Additional Context

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions