kdheepak / panvimdoc

Write documentation in pandoc markdown. Generate documentation in vimdoc.
https://kdheepak.com/panvimdoc
MIT License
263 stars 15 forks source link

Fix "vimdoc" codeblock, remove blank before List #39

Closed nanozuki closed 1 year ago

nanozuki commented 1 year ago

I found some issues when I generated some Vimdoc and tried to fix that.

  1. Since the pandoc API changed, the code block tag has moved from attr.class to attr.classed, so we should change the logic to detect the "vimdoc" block.
  2. In many markdown files and with some formatter (like prettier) settings: Markdown's OrderList or BulletList should be preceded by an empty line. So there is no need to add another \n to the header in the return value of Writer.
  3. Add the missed '\n' to OrderList's items.

For 2, is there a better way to achieve it?

nanozuki commented 1 year ago

I found that the tests are failed. Is this the expected result?

1. one2. two
kdheepak commented 1 year ago

Thanks for making a PR! Your changes are great!

My tests are at the moment largely to check whether the filter does the same thing between versions, i.e. the intended behavior of the filter is not captured in the tests, if that makes sense.

Basically, I'll need to update the tests to match your PR!

kdheepak commented 1 year ago

Let me make a few commits to your PR in a few minutes.

kdheepak commented 1 year ago

I made a new release with this change! https://github.com/kdheepak/panvimdoc/releases/tag/v3.0.6