From 2402cca6173663e86d7315088d08273731f9bfe7 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:20:52 -0400 Subject: [PATCH 01/16] chore: Update tests --- .JuliaFormatter.toml | 8 - .config/mise.lock | 118 +++ .config/mise.toml | 24 + .github/workflows/docs.yml | 23 +- .github/workflows/panvimdoc.yml | 12 +- .github/workflows/test.yml | 19 +- .python-version | 1 + Manifest.toml | 196 ----- Project.toml | 12 - justfile | 5 - pyproject.toml | 12 + src/panvimdoc.jl | 1 - test/definition-lists.jl | 123 --- test/demojify.jl | 83 -- test/description.jl | 84 -- test/headinglevelsby.jl | 161 ---- test/help.jl | 8 - test/ignore_rawblock.jl | 46 - test/mapping.jl | 82 -- test/markdown.jl | 813 ------------------ test/runtests.jl | 79 -- test/tables.jl | 208 ----- test/treesitter.jl | 80 -- tests/fixtures/render/dedupheadings_1.md | 10 + .../fixtures/render/dedupheadings_1.txt | 22 +- tests/fixtures/render/definition-lists_1.md | 20 + tests/fixtures/render/definition-lists_1.txt | 32 + tests/fixtures/render/definition-lists_2.md | 20 + tests/fixtures/render/definition-lists_2.txt | 32 + tests/fixtures/render/demojify_1.md | 9 + tests/fixtures/render/demojify_1.txt | 19 + tests/fixtures/render/demojify_2.md | 5 + tests/fixtures/render/demojify_2.txt | 15 + tests/fixtures/render/demojify_3.md | 1 + tests/fixtures/render/demojify_3.txt | 11 + tests/fixtures/render/description_1.md | 12 + tests/fixtures/render/description_1.txt | 22 + tests/fixtures/render/description_2.md | 12 + tests/fixtures/render/description_2.txt | 22 + tests/fixtures/render/headinglevelsby_1.md | 10 + tests/fixtures/render/headinglevelsby_1.txt | 37 + tests/fixtures/render/headinglevelsby_2.md | 10 + tests/fixtures/render/headinglevelsby_2.txt | 37 + tests/fixtures/render/headinglevelsby_3.md | 10 + tests/fixtures/render/headinglevelsby_3.txt | 31 + tests/fixtures/render/ignore_rawblock_1.md | 5 + tests/fixtures/render/ignore_rawblock_1.txt | 11 + tests/fixtures/render/ignore_rawblock_2.md | 5 + tests/fixtures/render/ignore_rawblock_2.txt | 13 + tests/fixtures/render/mapping_1.md | 11 + tests/fixtures/render/mapping_1.txt | 21 + tests/fixtures/render/mapping_2.md | 11 + tests/fixtures/render/mapping_2.txt | 21 + tests/fixtures/render/markdown_1.md | 412 +++++++++ tests/fixtures/render/markdown_1.txt | 11 + tests/fixtures/render/para_1.md | 3 + .../fixtures/render/para_1.txt | 14 +- tests/fixtures/render/tables_1.md | 100 +++ tests/fixtures/render/tables_1.txt | 97 +++ tests/fixtures/render/toc-emojis_1.md | 37 + .../fixtures/render/toc-emojis_1.txt | 50 +- tests/fixtures/render/toc_1.md | 12 + .../toc.jl => tests/fixtures/render/toc_1.txt | 74 +- tests/fixtures/render/toc_2.md | 12 + tests/fixtures/render/toc_2.txt | 32 + tests/fixtures/render/treesitter_1.md | 12 + tests/fixtures/render/treesitter_1.txt | 22 + tests/fixtures/render/treesitter_2.md | 12 + tests/fixtures/render/treesitter_2.txt | 22 + tests/fixtures/render_cases.json | 416 +++++++++ tests/test_panvimdoc.py | 141 +++ uv.lock | 270 ++++++ 72 files changed, 2264 insertions(+), 2180 deletions(-) delete mode 100644 .JuliaFormatter.toml create mode 100644 .config/mise.lock create mode 100644 .config/mise.toml create mode 100644 .python-version delete mode 100644 Manifest.toml delete mode 100644 Project.toml delete mode 100644 justfile create mode 100644 pyproject.toml delete mode 100644 src/panvimdoc.jl delete mode 100644 test/definition-lists.jl delete mode 100644 test/demojify.jl delete mode 100644 test/description.jl delete mode 100644 test/headinglevelsby.jl delete mode 100644 test/help.jl delete mode 100644 test/ignore_rawblock.jl delete mode 100644 test/mapping.jl delete mode 100644 test/markdown.jl delete mode 100644 test/runtests.jl delete mode 100644 test/tables.jl delete mode 100644 test/treesitter.jl create mode 100644 tests/fixtures/render/dedupheadings_1.md rename test/dedupheadings.jl => tests/fixtures/render/dedupheadings_1.txt (86%) create mode 100644 tests/fixtures/render/definition-lists_1.md create mode 100644 tests/fixtures/render/definition-lists_1.txt create mode 100644 tests/fixtures/render/definition-lists_2.md create mode 100644 tests/fixtures/render/definition-lists_2.txt create mode 100644 tests/fixtures/render/demojify_1.md create mode 100644 tests/fixtures/render/demojify_1.txt create mode 100644 tests/fixtures/render/demojify_2.md create mode 100644 tests/fixtures/render/demojify_2.txt create mode 100644 tests/fixtures/render/demojify_3.md create mode 100644 tests/fixtures/render/demojify_3.txt create mode 100644 tests/fixtures/render/description_1.md create mode 100644 tests/fixtures/render/description_1.txt create mode 100644 tests/fixtures/render/description_2.md create mode 100644 tests/fixtures/render/description_2.txt create mode 100644 tests/fixtures/render/headinglevelsby_1.md create mode 100644 tests/fixtures/render/headinglevelsby_1.txt create mode 100644 tests/fixtures/render/headinglevelsby_2.md create mode 100644 tests/fixtures/render/headinglevelsby_2.txt create mode 100644 tests/fixtures/render/headinglevelsby_3.md create mode 100644 tests/fixtures/render/headinglevelsby_3.txt create mode 100644 tests/fixtures/render/ignore_rawblock_1.md create mode 100644 tests/fixtures/render/ignore_rawblock_1.txt create mode 100644 tests/fixtures/render/ignore_rawblock_2.md create mode 100644 tests/fixtures/render/ignore_rawblock_2.txt create mode 100644 tests/fixtures/render/mapping_1.md create mode 100644 tests/fixtures/render/mapping_1.txt create mode 100644 tests/fixtures/render/mapping_2.md create mode 100644 tests/fixtures/render/mapping_2.txt create mode 100644 tests/fixtures/render/markdown_1.md create mode 100644 tests/fixtures/render/markdown_1.txt create mode 100644 tests/fixtures/render/para_1.md rename test/para.jl => tests/fixtures/render/para_1.txt (51%) create mode 100644 tests/fixtures/render/tables_1.md create mode 100644 tests/fixtures/render/tables_1.txt create mode 100644 tests/fixtures/render/toc-emojis_1.md rename test/toc-emojis.jl => tests/fixtures/render/toc-emojis_1.txt (71%) create mode 100644 tests/fixtures/render/toc_1.md rename test/toc.jl => tests/fixtures/render/toc_1.txt (53%) create mode 100644 tests/fixtures/render/toc_2.md create mode 100644 tests/fixtures/render/toc_2.txt create mode 100644 tests/fixtures/render/treesitter_1.md create mode 100644 tests/fixtures/render/treesitter_1.txt create mode 100644 tests/fixtures/render/treesitter_2.md create mode 100644 tests/fixtures/render/treesitter_2.txt create mode 100644 tests/fixtures/render_cases.json create mode 100644 tests/test_panvimdoc.py create mode 100644 uv.lock diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml deleted file mode 100644 index 9e29b83..0000000 --- a/.JuliaFormatter.toml +++ /dev/null @@ -1,8 +0,0 @@ -indent = 2 -margin = 120 -always_for_in = true -remove_extra_newlines = true -pipe_to_function_call = true -format_docstrings = true -normalize_line_endings = "unix" -separate_kwargs_with_semicolon = true diff --git a/.config/mise.lock b/.config/mise.lock new file mode 100644 index 0000000..6a3f983 --- /dev/null +++ b/.config/mise.lock @@ -0,0 +1,118 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +[[tools."github:jgm/pandoc"]] +version = "3.9.0.2" +backend = "github:jgm/pandoc" + +[tools."github:jgm/pandoc"."platforms.linux-arm64"] +checksum = "sha256:b6d21e8f9c3b15744f5a7ab40248019157ed7793875dbe0383d4c82ff572b528" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377165670" + +[tools."github:jgm/pandoc"."platforms.linux-arm64-musl"] +checksum = "sha256:b6d21e8f9c3b15744f5a7ab40248019157ed7793875dbe0383d4c82ff572b528" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377165670" + +[tools."github:jgm/pandoc"."platforms.linux-x64"] +checksum = "sha256:a69abfababda8a56969a254b09f9553a7be89ddec00d4e0fe9fd585d71a67508" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377165366" + +[tools."github:jgm/pandoc"."platforms.linux-x64-musl"] +checksum = "sha256:a69abfababda8a56969a254b09f9553a7be89ddec00d4e0fe9fd585d71a67508" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377165366" + +[tools."github:jgm/pandoc"."platforms.macos-arm64"] +checksum = "sha256:6e9eca844076bcbb599bbeebbba78a70f93b5307782b85c2c272872812c88875" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-arm64-macOS.zip" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377165034" + +[tools."github:jgm/pandoc"."platforms.macos-x64"] +checksum = "sha256:b9fbceabccbc8f34ac021a50483fc32f8160568d0b4b2c22d81bb29e3054fd82" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-x86_64-macOS.zip" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377167038" + +[tools."github:jgm/pandoc"."platforms.windows-x64"] +checksum = "sha256:c97542f2800f446e788d9f74237856d995421ad1bb3cc8324286840c5f272d3a" +url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-windows-x86_64.zip" +url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377166311" + +[[tools."github:neovim/neovim"]] +version = "stable" +backend = "github:neovim/neovim" + +[tools."github:neovim/neovim"."platforms.linux-arm64"] +checksum = "sha256:a3f8aa5590fd2ac930bcc5c9070b9ac1ec33461d262b6428874c5fc640f3f13c" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065328" + +[tools."github:neovim/neovim"."platforms.linux-arm64-musl"] +checksum = "sha256:a3f8aa5590fd2ac930bcc5c9070b9ac1ec33461d262b6428874c5fc640f3f13c" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065328" + +[tools."github:neovim/neovim"."platforms.linux-x64"] +checksum = "sha256:ab757a1fd9ad307d53d2df4045698906a7ca3993d92260dd8fe49108712d57d0" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065329" + +[tools."github:neovim/neovim"."platforms.linux-x64-musl"] +checksum = "sha256:ab757a1fd9ad307d53d2df4045698906a7ca3993d92260dd8fe49108712d57d0" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065329" + +[tools."github:neovim/neovim"."platforms.macos-arm64"] +checksum = "sha256:b77e01c5421ac1bac593eed5c2ea1b950439306dd4c32371ac2473792da9a9d5" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-macos-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065331" + +[tools."github:neovim/neovim"."platforms.macos-x64"] +checksum = "sha256:e59a5eafcdf824e2bf6a738e75f8f62ba4ff1b7f1c7daaec2d134aa46737907c" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-macos-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065327" + +[tools."github:neovim/neovim"."platforms.windows-x64"] +checksum = "sha256:75fedc530b3772ca9f177edc7db92560bb9d2d6700ac6d5b2c53eaf5a9317ae3" +url = "https://github.com/neovim/neovim/releases/download/stable/nvim-win64.zip" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065345" + +[[tools.uv]] +version = "0.11.2" +backend = "aqua:astral-sh/uv" + +[tools.uv."platforms.linux-arm64"] +checksum = "sha256:275d91dd1f1955136591e7ec5e1fa21e84d0d37ead7da7c35c3683df748d9855" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-arm64-musl"] +checksum = "sha256:275d91dd1f1955136591e7ec5e1fa21e84d0d37ead7da7c35c3683df748d9855" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-x64"] +checksum = "sha256:4700d9fc75734247587deb3e25dd2c6c24f4ac69e8fe91d6acad4a6013115c06" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-x64-musl"] +checksum = "sha256:4700d9fc75734247587deb3e25dd2c6c24f4ac69e8fe91d6acad4a6013115c06" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.macos-arm64"] +checksum = "sha256:4beaa9550f93ef7f0fc02f7c28c9c48cd61fe30db00f5ac8947e0a425c3fb282" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.macos-x64"] +checksum = "sha256:a9c3653245031304c50dd60ac0301bf6c112e12c38c32302a71d4fa6a63ba2cb" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.windows-x64"] +checksum = "sha256:171b7ccda1bbd562da6babeffcf533a1c6cc7862cf998da826e1db534fc43e48" +url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-pc-windows-msvc.zip" +provenance = "github-attestations" diff --git a/.config/mise.toml b/.config/mise.toml new file mode 100644 index 0000000..167528e --- /dev/null +++ b/.config/mise.toml @@ -0,0 +1,24 @@ +[settings] +env_shell_expand = true +status.show_env = true + +[tools] +uv = "latest" +"github:jgm/pandoc" = "latest" +"github:neovim/neovim" = "latest" + +[tasks."panvimdoc:build"] +description = "Build doc/panvimdoc.txt from doc/panvimdoc.md" +run = """ +./panvimdoc.sh --project-name panvimdoc --input-file doc/panvimdoc.md --vim-version 'NVIM v0.8.0' --toc true --description 'Convert Markdown docs to Vimdoc' --title-date-pattern '%Y %B %d' --dedup-subheadings true --demojify false --treesitter true --ignore-rawblocks true --doc-mapping false --doc-mapping-project-name true --shift-heading-level-by 0 --increment-heading-level-by 0 +""" + +[tasks."panvimdoc:docs"] +description = "Build the static docs site" +run = """ +pandoc --katex --from markdown+tex_math_single_backslash --to html5+smart --template=./scripts/template.html5 --css=/panvimdoc/css/theme.css --css=/panvimdoc/css/skylighting-solarized-theme.css --toc --wrap=none --metadata title=panvimdoc doc/panvimdoc.md --lua-filter=scripts/include-files.lua --lua-filter=scripts/skip-blocks.lua -t html -o public/index.html +""" + +[tasks."panvimdoc:test"] +description = "Run the pytest suite" +run = "uv run pytest -q" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7f86ea4..7503206 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,24 +13,13 @@ jobs: steps: - name: checkout code uses: actions/checkout@v3 - - name: pandoc markdown to html - uses: docker://pandoc/latex:3.1 + - name: Set up mise + uses: jdx/mise-action@v3 with: - args: >- - --katex - --from markdown+tex_math_single_backslash - --to html5+smart - --template="./scripts/template.html5" - --css="/panvimdoc/css/theme.css" - --css="/panvimdoc/css/skylighting-solarized-theme.css" - --toc - --wrap=none - --metadata title="panvimdoc" - doc/panvimdoc.md - --lua-filter=scripts/include-files.lua - --lua-filter=scripts/skip-blocks.lua - -t html - -o public/index.html + install: true + cache: true + - name: Build docs site + run: mise tasks run panvimdoc:docs - name: deploy to GitHub pages uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.github/workflows/panvimdoc.yml b/.github/workflows/panvimdoc.yml index 0d76027..7a431ba 100644 --- a/.github/workflows/panvimdoc.yml +++ b/.github/workflows/panvimdoc.yml @@ -7,13 +7,13 @@ jobs: runs-on: ubuntu-latest name: pandoc to vimdoc steps: - - uses: actions/checkout@v2 - - name: panvimdoc - uses: ./ + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v3 with: - vimdoc: panvimdoc - pandoc: doc/panvimdoc.md - treesitter: true + install: true + cache: true + - name: Build vimdoc + run: mise tasks run panvimdoc:build - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "Auto generate docs" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8c62b2..89e8da2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,16 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + uses: actions/checkout@v4 + - name: Set up mise + uses: jdx/mise-action@v3 with: - version: 1.9 - arch: x64 - - uses: julia-actions/julia-buildpkg@v1 - - name: Build Docker image - run: docker build -t test-image . - - uses: julia-actions/julia-runtest@v1 - with: - annotate: true - env: - DOCKER_IMAGE: test-image + install: true + cache: true + - name: Run tests + run: mise tasks run panvimdoc:test diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..6324d40 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 1e5c5ab..0000000 --- a/Manifest.toml +++ /dev/null @@ -1,196 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.9.2" -manifest_format = "2.0" -project_hash = "14665feaa1f642ac968d7a294ef475d6f1d69e4e" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.9.0" - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - - [deps.Compat.weakdeps] - Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DeepDiffs]] -git-tree-sha1 = "9824894295b62a6a4ab6adf1c7bf337b3a9ca34c" -uuid = "ab62b9b5-e342-54a8-a765-a90f495de1a6" -version = "1.2.0" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" -uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" - -[[deps.FilePathsBase]] -deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] -git-tree-sha1 = "e27c4ebe80e8699540f2d6c805cc12203b614f12" -uuid = "48062228-2e41-5def-b9a4-89aafe57970f" -version = "0.9.20" - -[[deps.InlineTest]] -deps = ["Test"] -git-tree-sha1 = "daf0743879904f0ad645ca6594e1479685f158a2" -uuid = "bd334432-b1e7-49c7-a2dc-dd9149e4ebd6" -version = "0.2.0" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" - -[[deps.JSON3]] -deps = ["Dates", "Mmap", "Parsers", "PrecompileTools", "StructTypes", "UUIDs"] -git-tree-sha1 = "95220473901735a0f4df9d1ca5b171b568b2daa3" -uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" -version = "1.13.2" - -[[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "cedb76b37bc5a6c702ade66be44f831fa23c681e" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.0" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" - -[[deps.Pandoc]] -deps = ["DataStructures", "DocStringExtensions", "EnumX", "FilePathsBase", "InlineTest", "JSON3", "Markdown", "ReTest", "StructTypes", "pandoc_jll"] -git-tree-sha1 = "51ffbad76bfc6f0dff3f2ba4e2e206587a94a5b7" -uuid = "f853b5e0-b243-11e9-0043-7da5023c5ee7" -version = "0.4.3" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.2" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.1.2" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.Random]] -deps = ["SHA", "Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.ReTest]] -deps = ["Distributed", "InlineTest", "Printf", "Random", "Sockets", "Test"] -git-tree-sha1 = "dd8f6587c0abac44bcec2e42f0aeddb73550c0ec" -uuid = "e0db7c4e-2690-44b9-bad6-7687da720f89" -version = "0.3.2" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.StructTypes]] -deps = ["Dates", "UUIDs"] -git-tree-sha1 = "ca4bccb03acf9faaf4137a9abc1881ed1841aa70" -uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" -version = "1.10.0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.TestSetExtensions]] -deps = ["DeepDiffs", "Distributed", "Test"] -git-tree-sha1 = "3a2919a78b04c29a1a57b05e1618e473162b15d0" -uuid = "98d24dd4-01ad-11ea-1b02-c9a08f80db04" -version = "2.0.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.pandoc_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a1cd90615d1ff32a0d4983e5af817ac6d5a504e2" -uuid = "c5432543-76ad-5c9d-82bf-db097047a5e2" -version = "3.1.0+0" diff --git a/Project.toml b/Project.toml deleted file mode 100644 index 1cef996..0000000 --- a/Project.toml +++ /dev/null @@ -1,12 +0,0 @@ -name = "panvimdoc" -uuid = "108592c7-02d7-45fd-92a9-4f9366214548" -authors = ["Dheepak Krishnamurthy =4.10.2", + "pydantic>=2.12.5", + "pytest>=9.0.3", + "rich>=15.0.0", +] diff --git a/src/panvimdoc.jl b/src/panvimdoc.jl deleted file mode 100644 index efee90a..0000000 --- a/src/panvimdoc.jl +++ /dev/null @@ -1 +0,0 @@ -module panvimdoc end diff --git a/test/definition-lists.jl b/test/definition-lists.jl deleted file mode 100644 index c1b4f16..0000000 --- a/test/definition-lists.jl +++ /dev/null @@ -1,123 +0,0 @@ -@testset "definition-lists" begin - doc = test_pandoc( - raw""" -:FnlCompileBuffer - -: Compiles current active fennel buffer - -:FnlCompile[!] - -: Diff compiles all indexed fennel files - If bang! is present then forcefully compiles all `source` files - -:Fnl {expr} - -: Executes and Evalutate {expr} of fennel - - ```fennel - :Fnl (print "Hello World") - - :Fnl (values some_var) - ``` - - Testing - """; - toc = false, - demojify = true, - doc_mapping_project_name = true, - ) - @test with_current_title(raw""" -*test.txt* Test Description - - *test-:FnlCompileBuffer* - - -:FnlCompileBuffer Compiles current active fennel buffer - - - *test-:FnlCompile* - - -:FnlCompile[!] Diff compiles all indexed fennel files - If bang! is present then forcefully compiles all `source` files - - - *test-:Fnl* - - -:Fnl {expr} Executes and Evalutate {expr} of fennel - >fennel - :Fnl (print "Hello World") - - :Fnl (values some_var) - < - Testing - - - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - raw""" -:FnlCompileBuffer - -: Compiles current active fennel buffer - -:FnlCompile[!] - -: Diff compiles all indexed fennel files - If bang! is present then forcefully compiles all `source` files - -:Fnl {expr} - -: Executes and Evalutate {expr} of fennel - - ```fennel - :Fnl (print "Hello World") - - :Fnl (values some_var) - ``` - - Testing - """; - toc = false, - demojify = true, - doc_mapping_project_name = false, - ) - @test with_current_title(raw""" -*test.txt* Test Description - - *:FnlCompileBuffer* - - -:FnlCompileBuffer Compiles current active fennel buffer - - - *:FnlCompile* - - -:FnlCompile[!] Diff compiles all indexed fennel files - If bang! is present then forcefully compiles all `source` files - - - *:Fnl* - - -:Fnl {expr} Executes and Evalutate {expr} of fennel - >fennel - :Fnl (print "Hello World") - - :Fnl (values some_var) - < - Testing - - - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/demojify.jl b/test/demojify.jl deleted file mode 100644 index a602582..0000000 --- a/test/demojify.jl +++ /dev/null @@ -1,83 +0,0 @@ -@testset "demojify" begin - doc = test_pandoc( - """ - Hello world :wave: - - echo 😎 cool # comment - - ```lua - "some/**/glob*" - ``` - - `"some/**/glob*"` - - - """; - demojify = true, - ) - - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -Hello world - -echocool # comment - ->lua - \"some/**/glob*\" -< - -`\"some/**/glob*\"` - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - """ -Hello world :wave: - -```sh - echo 😎cool # comment -``` - -"""; - demojify = false, - ) - - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -Hello world :wave: - ->sh - echo 😎cool # comment -< - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc("test🫠🫢🫣🫡🫥🫤🥹🫱🫲🫳🫴🫰🫵🫶🫦🫅🫃🫄🧌🪸🪷🪹🪺🫘🫗🫙🛝🛞🛟🪬🪩🪫🩼🩻🫧🪪🟰"; demojify = true) - - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -test - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/description.jl b/test/description.jl deleted file mode 100644 index ac85eac..0000000 --- a/test/description.jl +++ /dev/null @@ -1,84 +0,0 @@ -@testset "Treesitter" begin - doc = test_pandoc( - """ -Here's a YAML codeblock: - -```yaml -name: panvimdoc -on: [push] -jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -``` - """; - description = nothing, - ) - @test with_current_title(""" -*test.txt* For NVIM v0.8.0 Last change: $(CURRENT_DATE) - -============================================================================== -Table of Contents *test-table-of-contents* - -Here’s a YAML codeblock: - ->yaml - name: panvimdoc - on: [push] - jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -< - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -"""; description = nothing) == doc - - doc = test_pandoc( - """ -Here's a YAML codeblock: - -```yaml -name: panvimdoc -on: [push] -jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -``` - """; - vimversion = "VIM v9.0.0", - description = nothing, - ) - @test with_current_title(""" -*test.txt* For VIM v9.0.0 Last change: $(CURRENT_DATE) - -============================================================================== -Table of Contents *test-table-of-contents* - -Here’s a YAML codeblock: - ->yaml - name: panvimdoc - on: [push] - jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -< - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -"""; description = nothing, vimversion = "VIM v9.0.0") == doc -end diff --git a/test/headinglevelsby.jl b/test/headinglevelsby.jl deleted file mode 100644 index 7ef3958..0000000 --- a/test/headinglevelsby.jl +++ /dev/null @@ -1,161 +0,0 @@ -@testset "levelheadingsby" begin - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - toc = true, - shift_heading_level_by = 0, - increment_heading_level_by = 0, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -1. panvimdoc |test-panvimdoc| -2. TLDR |test-tldr| - - Summary 1 |test-summary-1| - - Summary 2 |test-summary-2| -3. Motivation |test-motivation| -4. References |test-references| - -============================================================================== -1. panvimdoc *test-panvimdoc* - - -============================================================================== -2. TLDR *test-tldr* - - -SUMMARY 1 *test-summary-1* - - -SUMMARY 2 *test-summary-2* - - -============================================================================== -3. Motivation *test-motivation* - - -============================================================================== -4. References *test-references* - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - shift_heading_level_by = 0, - increment_heading_level_by = 2, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -3. panvimdoc |test-panvimdoc| -4. TLDR |test-tldr| - - Summary 1 |test-summary-1| - - Summary 2 |test-summary-2| -5. Motivation |test-motivation| -6. References |test-references| - -============================================================================== -3. panvimdoc *test-panvimdoc* - - -============================================================================== -4. TLDR *test-tldr* - - -SUMMARY 1 *test-summary-1* - - -SUMMARY 2 *test-summary-2* - - -============================================================================== -5. Motivation *test-motivation* - - -============================================================================== -6. References *test-references* - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - shift_heading_level_by = 1, - increment_heading_level_by = 2, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - - - panvimdoc |test-panvimdoc| - - TLDR |test-tldr| - - Motivation |test-motivation| - - References |test-references| - -PANVIMDOC *test-panvimdoc* - - -TLDR *test-tldr* - - -SUMMARY 1 ~ - - -SUMMARY 2 ~ - - -MOTIVATION *test-motivation* - - -REFERENCES *test-references* - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/help.jl b/test/help.jl deleted file mode 100644 index 69ce2c3..0000000 --- a/test/help.jl +++ /dev/null @@ -1,8 +0,0 @@ -@testset "help-usage" begin - panvimdoc = "./panvimdoc.sh" - usage = cd(ROOT_DIR) do - read(`$panvimdoc -h`, String) - end - @test contains(usage, "Usage:") - @test contains(usage, "Arguments:") -end diff --git a/test/ignore_rawblock.jl b/test/ignore_rawblock.jl deleted file mode 100644 index afdbefd..0000000 --- a/test/ignore_rawblock.jl +++ /dev/null @@ -1,46 +0,0 @@ -@testset "ignore_rawblock" begin - doc = test_pandoc(""" -this is my great software, and this is a demo of it - -

- bla -

-""") - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -this is my great software, and this is a demo of it - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - """ -this is my great software, and this is a demo of it - -

- bla -

-"""; - ignore_rawblocks = false, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -this is my great software, and this is a demo of it - -

- -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/mapping.jl b/test/mapping.jl deleted file mode 100644 index ed69374..0000000 --- a/test/mapping.jl +++ /dev/null @@ -1,82 +0,0 @@ -@testset "markdown" begin - doc = test_pandoc( - raw""" -#### :FnlCompile[!] {doc=:FnlCompile} - -Diff compiles all indexed fennel files - -#### :FnlCompile[!] - -Diff compiles all indexed fennel files - -#### :[range]CommandName {doc=CommandName} - -#### :[range]CommandName - """; - toc = false, - demojify = true, - ) - @test with_current_title(raw""" -*test.txt* Test Description - -:FnlCompile[!] *:FnlCompile* - -Diff compiles all indexed fennel files - - -:FnlCompile[!] *test-:FnlCompile* - -Diff compiles all indexed fennel files - - -:[range]CommandName *CommandName* - - -:[range]CommandName *test-:CommandName* - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - raw""" -#### :FnlCompile[!] {doc=:FnlCompile} - -Diff compiles all indexed fennel files - -#### :FnlCompile[!] - -Diff compiles all indexed fennel files - -#### :[range]CommandName {doc=CommandName} - -#### :[range]CommandName - """; - toc = false, - demojify = true, - doc_mapping = false, - ) - @test with_current_title(raw""" -*test.txt* Test Description - -:FNLCOMPILE[!] - -Diff compiles all indexed fennel files - - -:FNLCOMPILE[!] - -Diff compiles all indexed fennel files - - -:[RANGE]COMMANDNAME - - -:[RANGE]COMMANDNAME - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/markdown.jl b/test/markdown.jl deleted file mode 100644 index 7dfc0f9..0000000 --- a/test/markdown.jl +++ /dev/null @@ -1,813 +0,0 @@ -@testset "markdown" begin - doc = test_pandoc( - raw""" -# panvimdoc - -
- -
- -
- - - -"Double quoted string" - -> Testing block quote - -| testing line -| block - -![caption](image.png) - -% Title - spanning multiple lines -% Author One - Author Two; Author Three; - Author Four - -# Additional markdown reader tests - -## Blank line before URL in link reference - -[foo] and [bar] - -[foo]: - /url - -[bar]: -/url -"title" - -## Raw ConTeXt environments - -\placeformula \startformula - L_{1} = L_{2} - \stopformula - -\start[a2] -\start[a2] -\stop[a2] -\stop[a2] - -## Raw LaTeX environments - -\begin{center} -\begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt] -\Tree [.{S} [.NP John\index{i} ] [.VP [.V likes ] [.NP himself\index{i,*j} ]]] -\end{tikzpicture} -\end{center} - -## URLs with spaces and punctuation - -[foo](/bar and baz) -[foo](/bar - and baz ) -[foo]( /bar and baz ) -[foo](bar baz "title" ) - -[baz][] [bam][] [bork][] - -[baz]: /foo foo -[bam]: /foo fee -[bork]: /foo/zee zob (title) - -[Ward's method.](http://en.wikipedia.org/wiki/Ward's_method) - -## Horizontal rules with spaces at end - -* * * * * - --- - -- -- - - -## Raw HTML before header - - - -### my header - -## $ in math - -$\$2 + \$3$ - -$x = \text{the $n$th root of $y$}$ - -This should not be math: - -$PATH 90 $PATH - -## Commented-out list item - -- one - -- three - -## Indented code at beginning of list - -- code - code - - 1. code - code - - 12345678. code - code - - - code - code - - - no code - -## Backslash newline - -hi\ -there - -## Code spans - -`hi\` - -`hi -there` - -`` hi````there `` - -`hi - -there` - -## helptags - -This content includes a helptag for `:h :a-complex.messy-%tag` inbetween other text. - -## Multilingual URLs - - - -[foo](/bar/测?x=测 "title") - -<测@foo.测.baz> - -## Numbered examples - -(@) First example. -(@foo) Second example. - -Explanation of examples (@foo) and (@bar). - -(@bar) Third example. - -## Macros - -\newcommand{\tuple}[1]{\langle #1 \rangle} - -$\tuple{x,y}$ - -## Case-insensitive references - -[Fum] - -[FUM] - -[bat] - -[fum]: /fum -[BAT]: /bat - -## Curly smart quotes - -“Hi” - -‘Hi’ - -## Consecutive lists - -- one -- two -1. one -2. two - - a. one - b. two - -## Implicit header references - -### My header - -### My other header - -A link to [My header]. - -Another link to [it][My header]. - -Should be [case insensitive][my header]. - -Link to [Explicit header attributes]. - -[my other header]: /foo - -But this is not a link to [My other header], since the reference is defined. - -## Explicit header attributes {#foobar .baz key="val"} - -> ## Header attributes inside block quote {#foobar .baz key="val"} - -## Line blocks - -| But can a bee be said to be -| or not to be an entire bee, -| when half the bee is not a bee, -| due to some ancient injury? -| -| Continuation - line -| and - another - -## Grid Tables - -+------------------+-----------+------------+ -| col 1 | col 2 | col 3 | -+==================+===========+============+ -| r1 a | b | c | -| r1 bis | b 2 | c 2 | -+------------------+-----------+------------+ -| r2 d | e | f | -+------------------+-----------+------------+ - -Headless - -+------------------+-----------+------------+ -| r1 a | b | c | -| r1 bis | b 2 | c 2 | -+------------------+-----------+------------+ -| r2 d | e | f | -+------------------+-----------+------------+ - -With alignments - -+------------------+-----------+------------+ -| col 1 | col 2 | col 3 | -+=================:+:==========+:==========:+ -| r1 a | b | c | -| r1 bis | b 2 | c 2 | -+------------------+-----------+------------+ -| r2 d | e | f | -+------------------+-----------+------------+ - -Headless with alignments - -+-----------------:+:----------+:----------:+ -| r1 a | b | c | -| r1 bis | b 2 | c 2 | -+------------------+-----------+------------+ -| r2 d | e | f | -+------------------+-----------+------------+ - -Spaces at ends of lines - -+------------------+-----------+------------+ -| r1 a | b | c | -| r1 bis | b 2 | c 2 | -+------------------+-----------+------------+ -| r2 d | e | f | -+------------------+-----------+------------+ - -Multiple blocks in a cell - -+------------------+-----------+------------+ -| # col 1 | # col 2 | # col 3 | -| col 1 | col 2 | col 3 | -+------------------+-----------+------------+ -| r1 a | - b | c | -| | - b 2 | c 2 | -| r1 bis | - b 2 | c 2 | -+------------------+-----------+------------+ - -East Asian characters have double width - -+--+----+ -|魚|fish| -+--+----+ - -Zero-width space in German - -+-------+-------+ -|German |English| -+-------+-------+ -|Auf‌lage|edition| -+-------+-------+ - -Zero-width non-joiner in Persian - -+-------+---------+ -|می‌خواهم|I want to| -+-------+---------+ - -Empty cells - -+---+---+ -| | | -+---+---+ - - -Table with cells spanning multiple rows or columns: - -+---------------------+----------+ -| Property | Earth | -+=============+=======+==========+ -| | min | -89.2 °C | -| Temperature +-------+----------+ -| 1961-1990 | mean | 14 °C | -| +-------+----------+ -| | min | 56.7 °C | -+-------------+-------+----------+ - -Table with complex header: - -+---------------------+-----------------------+ -| Location | Temperature 1961-1990 | -| | in degree Celsius | -| +-------+-------+-------+ -| | min | mean | max | -+=====================+=======+=======+=======+ -| Antarctica | -89.2 | N/A | 19.8 | -+---------------------+-------+-------+-------+ -| Earth | -89.2 | 14 | 56.7 | -+---------------------+-------+-------+-------+ - -## Entities in links and titles - -[link](/ürl "öö!") - - - - - -[foobar] - -[foobar]: /ürl "öö!" - -## Parentheses in URLs - -[link](/hi(there)) - -[link](/hithere\)) - -[linky] - -[linky]: hi_(there_(nested)) - -## Backslashes in link references - -[\*\a](b) - -## Reference link fallbacks - -[*not a link*] [*nope*]... - -## Reference link followed by a citation - -MapReduce is a paradigm popularized by [Google] [@mapreduce] as its -most vocal proponent. - -[Google]: http://google.com - -## Empty reference links - -[foo2]: - -bar - -[foo2] - -## Wrapping - -- blah blah blah blah blah blah blah blah blah blah blah blah blah blah 2015. - -## Bracketed spans - -[*foo* bar baz [link](url)]{.class #id key=val} - -## panvimdoc-include-comment - - - - - - """; - toc = false, - demojify = true, - ) - @test with_current_title(raw""" -*test.txt* Test Description - -============================================================================== -1. panvimdoc *test-panvimdoc* - - - - -"Double quoted string" - - - Testing block quote - -| testing line -| block -% Title spanning multiple lines % Author One Author Two; Author Three; Author -Four - - -============================================================================== -2. Additional markdown reader tests *test-additional-markdown-reader-tests* - - -BLANK LINE BEFORE URL IN LINK REFERENCE*test-blank-line-before-url-in-link-reference* - -foo and bar - - -RAW CONTEXT ENVIRONMENTS *test-raw-context-environments* - -L_{1} = L_{2} - - -RAW LATEX ENVIRONMENTS *test-raw-latex-environments* - - -URLS WITH SPACES AND PUNCTUATION *test-urls-with-spaces-and-punctuation* - -foo foo foo foo - - -baz bam bork - -Ward’s method. - - -HORIZONTAL RULES WITH SPACES AT END *test-horizontal-rules-with-spaces-at-end* - ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- - -RAW HTML BEFORE HEADER *test-raw-html-before-header* - - - - -MY HEADER ~ - - -$ IN MATH *test-$-in-math* - -`\$2 + \$3` - -`x = \text{the $n$th root of $y$}` - -This should not be math: - -$PATH 90 $PATH - - -COMMENTED-OUT LIST ITEM *test-commented-out-list-item* - -- one -- three - - -INDENTED CODE AT BEGINNING OF LIST *test-indented-code-at-beginning-of-list* - -- > - code - code - < - 1. > - code - code - < - 2. > - code - code - < - - > - code - code - < - - no code - - -BACKSLASH NEWLINE *test-backslash-newline* - -hi there - - -CODE SPANS *test-code-spans* - -`hi\` - -`hi there` - -`hi````there` - -`hi - -there` - - -HELPTAGS *test-helptags* - -This content includes a helptag for |:a-complex.messy-%tag| inbetween other -text. - - -MULTILINGUAL URLS *test-multilingual-urls* - - - -foo - -@foo..baz - - -NUMBERED EXAMPLES *test-numbered-examples* - -1. First example. -2. Second example. - -Explanation of examples (2) and (3). - -1. Third example. - - -MACROS *test-macros* - -`\langle x,y \rangle` - - -CASE-INSENSITIVE REFERENCES *test-case-insensitive-references* - -Fum - -FUM - -bat - - -CURLY SMART QUOTES *test-curly-smart-quotes* - -"Hi" - -'Hi' - - -CONSECUTIVE LISTS *test-consecutive-lists* - -- one -- two - -1. one -2. two - -1. one -2. two - - -IMPLICIT HEADER REFERENCES *test-implicit-header-references* - - -MY HEADER ~ - - -MY OTHER HEADER ~ - -A link to |test-my-header|. - -Another link to |test-it|. - -Should be |test-case-insensitive|. - -Link to |test-explicit-header-attributes|. - -But this is not a link to My other header , since the reference is -defined. - - -EXPLICIT HEADER ATTRIBUTES *test-explicit-header-attributes* - - - HEADER ATTRIBUTES INSIDE BLOCK QUOTE*test-header-attributes-inside-block-quote* - -LINE BLOCKS *test-line-blocks* - - -| But can a bee be said to be -|     or not to be an entire bee, -|         when half the bee is not a bee, -|             due to some ancient injury? -| -| Continuation line -|   and another - -GRID TABLES *test-grid-tables* - - ------------------------------------------- - col 1 col 2 col 3 - ------------------ ----------- ------------ - r1 a r1 bis b b 2 c c 2 - - r2 d e f - ------------------------------------------- -Headless - - ------------------ ----------- ------------ - r1 a r1 bis b b 2 c c 2 - - r2 d e f - ------------------ ----------- ------------ -With alignments - - ------------------------------------------- - col 1 col 2 col 3 - ------------------ ----------- ------------ - r1 a r1 bis b b 2 c c 2 - - r2 d e f - ------------------------------------------- -Headless with alignments - - ------------------ ----------- ------------ - r1 a r1 bis b b 2 c c 2 - - r2 d e f - ------------------ ----------- ------------ -Spaces at ends of lines - - ------------------ ----------- ------------ - r1 a r1 bis b b 2 c c 2 - - r2 d e f - ------------------ ----------- ------------ -Multiple blocks in a cell - -+------------------+-----------+------------+ -| col 1 | col 2 | col 3 | -| | | | -| col 1 | col 2 | col 3 | -+------------------+-----------+------------+ -| r1 a | - b | c c 2 c 2 | -| | - b 2 | | -| r1 bis | - b 2 | | -+------------------+-----------+------------+ -East Asian characters have double width - - -- ------ - fish - - -- ------ -Zero-widthspace in German - - --------- --------- - German English - - Auf‌lage edition - --------- --------- -Zero-width non-joiner in Persian - - --------- --------- - می‌خواهم I want to - - --------- --------- -Empty cells - - --- --- - - - --- --- -Table with cells spanning multiple rows or columns: - - -------------------------------- - Property Earth - ------------- ------- ---------- - Temperature min -89.2 °C - 1961-1990 - - mean 14 °C - - min 56.7 °C - -------------------------------- -Table with complex header: - - --------------------------------------------------- - Location Temperature - 1961-1990 in - degree - Celsius - --------------------- ------------- ------- ------- - min mean max - - Antarctica -89.2 N/A 19.8 - - Earth -89.2 14 56.7 - --------------------------------------------------- - -ENTITIES IN LINKS AND TITLES *test-entities-in-links-and-titles* - -link - - - -me@exämple.com - -foobar - - -PARENTHESES IN URLS *test-parentheses-in-urls* - -link - -link - -linky - - -BACKSLASHES IN LINK REFERENCES *test-backslashes-in-link-references* - - - - -REFERENCELINK FALLBACKS *test-referencelink-fallbacks* - -[_not a link_] [_nope_]… - - -REFERENCE LINK FOLLOWED BY A CITATION*test-reference-link-followed-by-a-citation* - -MapReduce is a paradigm popularized by Google -(**mapreduce?**) as its most vocal proponent. - - -EMPTY REFERENCE LINKS *test-empty-reference-links* - -bar - -foo2 <> - - -WRAPPING *test-wrapping* - -- blah blah blah blah blah blah blah blah blah blah blah blah blah blah 2015. - - -BRACKETED SPANS *test-bracketed-spans* - -_foo_ bar baz link - - -PANVIMDOC-INCLUDE-COMMENT *test-panvimdoc-include-comment* - -Neovim is a great text editor. - -Neovim supports |lua| plugins and is also: - -- Multiplatform -- Open source - - -ALL CONTENT TYPES *test-all-content-types* - - -ARE SUPPORTED ~ - -See neovim.org . - -============================================================================== -3. Links *test-links* - -1. *caption*: image.png -2. *(**mapreduce?**)*: - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/runtests.jl b/test/runtests.jl deleted file mode 100644 index 3098ba4..0000000 --- a/test/runtests.jl +++ /dev/null @@ -1,79 +0,0 @@ -using TestSetExtensions -using Test -using Dates -using Pandoc - -ROOT_DIR = abspath(dirname(@__DIR__)) -CUR_DIR = abspath(@__DIR__) -SCRIPTS_DIR = joinpath(ROOT_DIR, "scripts") -CURRENT_DATE = Dates.format(Dates.now(), dateformat"yyyy U dd") - -function expected_title(; - project = "test", - description::Union{String, Nothing} = "Test Description", - vimversion = "NVIM v0.8.0", - date = CURRENT_DATE, -) - title = "*$(project).txt*" - if description !== nothing && !isempty(description) - title *= repeat(" ", max(1, 78 - length(title) - length(description))) * description - end - subtitle = "For $(vimversion) Last change: $(date)" - subtitle = repeat(" ", max(0, 78 - length(subtitle))) * subtitle - return title * "\n" * subtitle -end - -function with_current_title( - expected::String; - description::Union{String, Nothing} = "Test Description", - vimversion = "NVIM v0.8.0", - date = CURRENT_DATE, -) - lines = split(expected, "\n"; keepempty = true) - body = join(lines[3:end], "\n") - return expected_title(; description, vimversion, date) * "\n\n" * body -end - -function test_pandoc( - text::String; - toc = true, - dedup_subheadings = false, - treesitter = true, - demojify = false, - description = "Test Description", - vimversion = "NVIM v0.8.0", - ignore_rawblocks = true, - shift_heading_level_by = 0, - increment_heading_level_by = 0, - doc_mapping = true, - doc_mapping_project_name = true, - date = CURRENT_DATE, -) - isfile(joinpath(ROOT_DIR, "doc/test.txt")) && rm(joinpath(ROOT_DIR, "doc/test.txt")) - open(joinpath(CUR_DIR, "test.md"), "w") do file - write(file, text) - end - filters = `--lua-filter=$SCRIPTS_DIR/skip-blocks.lua --lua-filter=$SCRIPTS_DIR/include-files.lua` - if demojify - filters = `$filters --lua-filter=$SCRIPTS_DIR/remove-emojis.lua` - end - metadata = `--metadata=project:"test" --metadata=vimversion:"$vimversion" --metadata=toc:$toc --metadata=dedupsubheadings:$dedup_subheadings --metadata=treesitter:$treesitter --metadata=ignorerawblocks:$ignore_rawblocks --metadata=incrementheadinglevelby:$increment_heading_level_by --metadata=docmappingproject:$doc_mapping_project_name --metadata=docmapping:$doc_mapping --metadata=date:"$date"` - if description !== nothing - metadata = `$metadata --metadata=description:"$description"` - end - - cd(ROOT_DIR) do - run( - `$(Pandoc.pandoc()) --citeproc --shift-heading-level-by=$shift_heading_level_by $metadata $filters -t $SCRIPTS_DIR/panvimdoc.lua $CUR_DIR/test.md -o test/test.txt`, - ) - end - doc = read(joinpath(ROOT_DIR, "test/test.txt"), String) - doc = join(rstrip.(split(doc, "\n")), "\n") - rm(joinpath(ROOT_DIR, "test/test.txt")) - rm(joinpath(CUR_DIR, "test.md")) - return doc -end - -@testset ExtendedTestSet "All the tests" begin - @includetests ARGS -end diff --git a/test/tables.jl b/test/tables.jl deleted file mode 100644 index e5c59f2..0000000 --- a/test/tables.jl +++ /dev/null @@ -1,208 +0,0 @@ -@testset "toc" begin - doc = test_pandoc( - raw""" - Right Left Center Default -------- ------ ---------- ------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 - -Table: Demonstration of simple table syntax. - -------- ------ ---------- ------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 -------- ------ ---------- ------- - -------------------------------------------------------------- - Centered Default Right Left - Header Aligned Aligned Aligned ------------ ------- --------------- ------------------------- - First row 12.0 Example of a row that - spans multiple lines. - - Second row 5.0 Here's another one. Note - the blank line between - rows. -------------------------------------------------------------- - -Table: Here's the caption. It, too, may span -multiple lines. - ------------ ------- --------------- ------------------------- - First row 12.0 Example of a row that - spans multiple lines. - - Second row 5.0 Here's another one. Note - the blank line between - rows. ------------ ------- --------------- ------------------------- - -: Here's a multiline table without a header. - - -: Sample grid table. - -+---------------+---------------+--------------------+ -| Fruit | Price | Advantages | -+===============+===============+====================+ -| Bananas | $1.34 | - built-in wrapper | -| | | - bright color | -+---------------+---------------+--------------------+ -| Oranges | $2.10 | - cures scurvy | -| | | - tasty | -+---------------+---------------+--------------------+ - -Cells can span multiple columns or rows: - -+---------------------+----------+ -| Property | Earth | -+=============+=======+==========+ -| | min | -89.2 °C | -| Temperature +-------+----------+ -| 1961-1990 | mean | 14 °C | -| +-------+----------+ -| | min | 56.7 °C | -+-------------+-------+----------+ - -A table header may contain more than one row: - -+---------------------+-----------------------+ -| Location | Temperature 1961-1990 | -| | in degree Celsius | -| +-------+-------+-------+ -| | min | mean | max | -+=====================+=======+=======+=======+ -| Antarctica | -89.2 | N/A | 19.8 | -+---------------------+-------+-------+-------+ -| Earth | -89.2 | 14 | 56.7 | -+---------------------+-------+-------+-------+ - -+---------------+---------------+--------------------+ -| Right | Left | Centered | -+==============:+:==============+:==================:+ -| Bananas | $1.34 | built-in wrapper | -+---------------+---------------+--------------------+ - -| Right | Left | Default | Center | -|------:|:-----|---------|:------:| -| 12 | 12 | 12 | 12 | -| 123 | 123 | 123 | 123 | -| 1 | 1 | 1 | 1 | - -fruit| price ------|-----: -apple|2.05 -pear|1.37 -orange|3.09 - -| One | Two | -|-----+-------| -| my | table | -| is | nice | - """; - toc = false, - ) - @test with_current_title(raw""" -*test.txt* Test Description - - Right Left Center Default - ------- ------ -------- --------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 - - : Demonstration of simple table syntax. - ----- ----- ----- ----- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 - ----- ----- ----- ----- - --------------------------------------------------------------- - Centered Default Right Aligned Left Aligned - Header Aligned - ----------- --------- --------------- ------------------------- - First row 12.0 Example of a row that - spans multiple lines. - - Second row 5.0 Here’s another one. Note - the blank line between - rows. - --------------------------------------------------------------- - - : Here’s the caption. It, too, may span multiple lines. - ----------- ------- --------------- ------------------------- - First row 12.0 Example of a row that - spans multiple lines. - - Second row 5.0 Here’s another one. Note - the blank line between - rows. - ----------- ------- --------------- ------------------------- - - : Here’s a multiline table without a header. -+---------------+---------------+--------------------+ -| Fruit | Price | Advantages | -+===============+===============+====================+ -| Bananas | $1.34 | - built-in | -| | | wrapper | -| | | - bright color | -+---------------+---------------+--------------------+ -| Oranges | $2.10 | - cures scurvy | -| | | - tasty | -+---------------+---------------+--------------------+ - -: Sample grid table. -Cells can span multiple columns or rows: - - -------------------------------- - Property Earth - ------------- ------- ---------- - Temperature min -89.2 °C - 1961-1990 - - mean 14 °C - - min 56.7 °C - -------------------------------- -A table header may contain more than one row: - - --------------------------------------------------- - Location Temperature - 1961-1990 in - degree - Celsius - --------------------- ------------- ------- ------- - min mean max - - Antarctica -89.2 N/A 19.8 - - Earth -89.2 14 56.7 - --------------------------------------------------- - ---------------------------------------------------- - Right Left Centered - --------------- --------------- -------------------- - Bananas $1.34 built-in wrapper - - ---------------------------------------------------- - Right Left Default Center - ------- ------ --------- -------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 - fruit price - -------- ------- - apple 2.05 - pear 1.37 - orange 3.09 - One Two - ----- ------- - my table - is nice - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/test/treesitter.jl b/test/treesitter.jl deleted file mode 100644 index 56d5aa8..0000000 --- a/test/treesitter.jl +++ /dev/null @@ -1,80 +0,0 @@ -@testset "Treesitter" begin - doc = test_pandoc(""" -Here's a YAML codeblock: - -```yaml -name: panvimdoc -on: [push] -jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -``` - """) - @test doc == with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -Here’s a YAML codeblock: - ->yaml - name: panvimdoc - on: [push] - jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -< - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") - - doc = test_pandoc( - """ -Here's a YAML codeblock: - -```yaml -name: panvimdoc -on: [push] -jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -``` - """; - treesitter = false, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -Table of Contents *test-table-of-contents* - -Here’s a YAML codeblock: - -> - name: panvimdoc - on: [push] - jobs: - docs: - runs-on: ubuntu-latest - name: pandoc to vimdoc - steps: - - uses: actions/checkout@v2 -< - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/tests/fixtures/render/dedupheadings_1.md b/tests/fixtures/render/dedupheadings_1.md new file mode 100644 index 0000000..b45ead5 --- /dev/null +++ b/tests/fixtures/render/dedupheadings_1.md @@ -0,0 +1,10 @@ +# panvimdoc + +# TLDR + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/test/dedupheadings.jl b/tests/fixtures/render/dedupheadings_1.txt similarity index 86% rename from test/dedupheadings.jl rename to tests/fixtures/render/dedupheadings_1.txt index 6b29924..9c0c1fc 100644 --- a/test/dedupheadings.jl +++ b/tests/fixtures/render/dedupheadings_1.txt @@ -1,23 +1,5 @@ - -@testset "toc" begin - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - toc = true, - dedup_subheadings = true, - ) - @test with_current_title(""" *test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 ============================================================================== Table of Contents *test-table-of-contents* @@ -53,5 +35,3 @@ SUMMARY 2 *test-tldr-summary-2* Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/tests/fixtures/render/definition-lists_1.md b/tests/fixtures/render/definition-lists_1.md new file mode 100644 index 0000000..fedcf58 --- /dev/null +++ b/tests/fixtures/render/definition-lists_1.md @@ -0,0 +1,20 @@ +:FnlCompileBuffer + +: Compiles current active fennel buffer + +:FnlCompile[!] + +: Diff compiles all indexed fennel files + If bang! is present then forcefully compiles all `source` files + +:Fnl {expr} + +: Executes and Evalutate {expr} of fennel + + ```fennel + :Fnl (print "Hello World") + + :Fnl (values some_var) + ``` + + Testing diff --git a/tests/fixtures/render/definition-lists_1.txt b/tests/fixtures/render/definition-lists_1.txt new file mode 100644 index 0000000..958f22e --- /dev/null +++ b/tests/fixtures/render/definition-lists_1.txt @@ -0,0 +1,32 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + + *test-:FnlCompileBuffer* + + +:FnlCompileBuffer Compiles current active fennel buffer + + + *test-:FnlCompile* + + +:FnlCompile[!] Diff compiles all indexed fennel files + If bang! is present then forcefully compiles all `source` files + + + *test-:Fnl* + + +:Fnl {expr} Executes and Evalutate {expr} of fennel + >fennel + :Fnl (print "Hello World") + + :Fnl (values some_var) + < + Testing + + + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/definition-lists_2.md b/tests/fixtures/render/definition-lists_2.md new file mode 100644 index 0000000..fedcf58 --- /dev/null +++ b/tests/fixtures/render/definition-lists_2.md @@ -0,0 +1,20 @@ +:FnlCompileBuffer + +: Compiles current active fennel buffer + +:FnlCompile[!] + +: Diff compiles all indexed fennel files + If bang! is present then forcefully compiles all `source` files + +:Fnl {expr} + +: Executes and Evalutate {expr} of fennel + + ```fennel + :Fnl (print "Hello World") + + :Fnl (values some_var) + ``` + + Testing diff --git a/tests/fixtures/render/definition-lists_2.txt b/tests/fixtures/render/definition-lists_2.txt new file mode 100644 index 0000000..dbe85de --- /dev/null +++ b/tests/fixtures/render/definition-lists_2.txt @@ -0,0 +1,32 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + + *:FnlCompileBuffer* + + +:FnlCompileBuffer Compiles current active fennel buffer + + + *:FnlCompile* + + +:FnlCompile[!] Diff compiles all indexed fennel files + If bang! is present then forcefully compiles all `source` files + + + *:Fnl* + + +:Fnl {expr} Executes and Evalutate {expr} of fennel + >fennel + :Fnl (print "Hello World") + + :Fnl (values some_var) + < + Testing + + + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/demojify_1.md b/tests/fixtures/render/demojify_1.md new file mode 100644 index 0000000..0568ee1 --- /dev/null +++ b/tests/fixtures/render/demojify_1.md @@ -0,0 +1,9 @@ +Hello world :wave: + + echo 😎 cool # comment + +```lua +"some/**/glob*" +``` + +`"some/**/glob*"` diff --git a/tests/fixtures/render/demojify_1.txt b/tests/fixtures/render/demojify_1.txt new file mode 100644 index 0000000..c4b2839 --- /dev/null +++ b/tests/fixtures/render/demojify_1.txt @@ -0,0 +1,19 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Hello world + +echocool # comment + +>lua + "some/**/glob*" +< + +`"some/**/glob*"` + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/demojify_2.md b/tests/fixtures/render/demojify_2.md new file mode 100644 index 0000000..b440379 --- /dev/null +++ b/tests/fixtures/render/demojify_2.md @@ -0,0 +1,5 @@ +Hello world :wave: + +```sh + echo 😎cool # comment +``` diff --git a/tests/fixtures/render/demojify_2.txt b/tests/fixtures/render/demojify_2.txt new file mode 100644 index 0000000..e607fc4 --- /dev/null +++ b/tests/fixtures/render/demojify_2.txt @@ -0,0 +1,15 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Hello world :wave: + +>sh + echo 😎cool # comment +< + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/demojify_3.md b/tests/fixtures/render/demojify_3.md new file mode 100644 index 0000000..f82c5e5 --- /dev/null +++ b/tests/fixtures/render/demojify_3.md @@ -0,0 +1 @@ +test🫠🫢🫣🫡🫥🫤🥹🫱🫲🫳🫴🫰🫵🫶🫦🫅🫃🫄🧌🪸🪷🪹🪺🫘🫗🫙🛝🛞🛟🪬🪩🪫🩼🩻🫧🪪🟰 diff --git a/tests/fixtures/render/demojify_3.txt b/tests/fixtures/render/demojify_3.txt new file mode 100644 index 0000000..fc57ff8 --- /dev/null +++ b/tests/fixtures/render/demojify_3.txt @@ -0,0 +1,11 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +test + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/description_1.md b/tests/fixtures/render/description_1.md new file mode 100644 index 0000000..d7b552c --- /dev/null +++ b/tests/fixtures/render/description_1.md @@ -0,0 +1,12 @@ +Here's a YAML codeblock: + +```yaml +name: panvimdoc +on: [push] +jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +``` diff --git a/tests/fixtures/render/description_1.txt b/tests/fixtures/render/description_1.txt new file mode 100644 index 0000000..8be346a --- /dev/null +++ b/tests/fixtures/render/description_1.txt @@ -0,0 +1,22 @@ +*test.txt* + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Here’s a YAML codeblock: + +>yaml + name: panvimdoc + on: [push] + jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +< + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/description_2.md b/tests/fixtures/render/description_2.md new file mode 100644 index 0000000..d7b552c --- /dev/null +++ b/tests/fixtures/render/description_2.md @@ -0,0 +1,12 @@ +Here's a YAML codeblock: + +```yaml +name: panvimdoc +on: [push] +jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +``` diff --git a/tests/fixtures/render/description_2.txt b/tests/fixtures/render/description_2.txt new file mode 100644 index 0000000..7992ad4 --- /dev/null +++ b/tests/fixtures/render/description_2.txt @@ -0,0 +1,22 @@ +*test.txt* + For VIM v9.0.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Here’s a YAML codeblock: + +>yaml + name: panvimdoc + on: [push] + jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +< + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/headinglevelsby_1.md b/tests/fixtures/render/headinglevelsby_1.md new file mode 100644 index 0000000..b45ead5 --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_1.md @@ -0,0 +1,10 @@ +# panvimdoc + +# TLDR + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/tests/fixtures/render/headinglevelsby_1.txt b/tests/fixtures/render/headinglevelsby_1.txt new file mode 100644 index 0000000..1a22094 --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_1.txt @@ -0,0 +1,37 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +1. panvimdoc |test-panvimdoc| +2. TLDR |test-tldr| + - Summary 1 |test-summary-1| + - Summary 2 |test-summary-2| +3. Motivation |test-motivation| +4. References |test-references| + +============================================================================== +1. panvimdoc *test-panvimdoc* + + +============================================================================== +2. TLDR *test-tldr* + + +SUMMARY 1 *test-summary-1* + + +SUMMARY 2 *test-summary-2* + + +============================================================================== +3. Motivation *test-motivation* + + +============================================================================== +4. References *test-references* + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/headinglevelsby_2.md b/tests/fixtures/render/headinglevelsby_2.md new file mode 100644 index 0000000..b45ead5 --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_2.md @@ -0,0 +1,10 @@ +# panvimdoc + +# TLDR + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/tests/fixtures/render/headinglevelsby_2.txt b/tests/fixtures/render/headinglevelsby_2.txt new file mode 100644 index 0000000..4bb850f --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_2.txt @@ -0,0 +1,37 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +3. panvimdoc |test-panvimdoc| +4. TLDR |test-tldr| + - Summary 1 |test-summary-1| + - Summary 2 |test-summary-2| +5. Motivation |test-motivation| +6. References |test-references| + +============================================================================== +3. panvimdoc *test-panvimdoc* + + +============================================================================== +4. TLDR *test-tldr* + + +SUMMARY 1 *test-summary-1* + + +SUMMARY 2 *test-summary-2* + + +============================================================================== +5. Motivation *test-motivation* + + +============================================================================== +6. References *test-references* + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/headinglevelsby_3.md b/tests/fixtures/render/headinglevelsby_3.md new file mode 100644 index 0000000..b45ead5 --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_3.md @@ -0,0 +1,10 @@ +# panvimdoc + +# TLDR + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/tests/fixtures/render/headinglevelsby_3.txt b/tests/fixtures/render/headinglevelsby_3.txt new file mode 100644 index 0000000..85e63dd --- /dev/null +++ b/tests/fixtures/render/headinglevelsby_3.txt @@ -0,0 +1,31 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + + - panvimdoc |test-panvimdoc| + - TLDR |test-tldr| + - Motivation |test-motivation| + - References |test-references| + +PANVIMDOC *test-panvimdoc* + + +TLDR *test-tldr* + + +SUMMARY 1 ~ + + +SUMMARY 2 ~ + + +MOTIVATION *test-motivation* + + +REFERENCES *test-references* + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/ignore_rawblock_1.md b/tests/fixtures/render/ignore_rawblock_1.md new file mode 100644 index 0000000..a2c2fe6 --- /dev/null +++ b/tests/fixtures/render/ignore_rawblock_1.md @@ -0,0 +1,5 @@ +this is my great software, and this is a demo of it + +

+ bla +

diff --git a/tests/fixtures/render/ignore_rawblock_1.txt b/tests/fixtures/render/ignore_rawblock_1.txt new file mode 100644 index 0000000..d07152e --- /dev/null +++ b/tests/fixtures/render/ignore_rawblock_1.txt @@ -0,0 +1,11 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +this is my great software, and this is a demo of it + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/ignore_rawblock_2.md b/tests/fixtures/render/ignore_rawblock_2.md new file mode 100644 index 0000000..a2c2fe6 --- /dev/null +++ b/tests/fixtures/render/ignore_rawblock_2.md @@ -0,0 +1,5 @@ +this is my great software, and this is a demo of it + +

+ bla +

diff --git a/tests/fixtures/render/ignore_rawblock_2.txt b/tests/fixtures/render/ignore_rawblock_2.txt new file mode 100644 index 0000000..1b785ee --- /dev/null +++ b/tests/fixtures/render/ignore_rawblock_2.txt @@ -0,0 +1,13 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +this is my great software, and this is a demo of it + +

+ +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/mapping_1.md b/tests/fixtures/render/mapping_1.md new file mode 100644 index 0000000..e9c14fb --- /dev/null +++ b/tests/fixtures/render/mapping_1.md @@ -0,0 +1,11 @@ +#### :FnlCompile[!] {doc=:FnlCompile} + +Diff compiles all indexed fennel files + +#### :FnlCompile[!] + +Diff compiles all indexed fennel files + +#### :[range]CommandName {doc=CommandName} + +#### :[range]CommandName diff --git a/tests/fixtures/render/mapping_1.txt b/tests/fixtures/render/mapping_1.txt new file mode 100644 index 0000000..06ed146 --- /dev/null +++ b/tests/fixtures/render/mapping_1.txt @@ -0,0 +1,21 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +:FnlCompile[!] *:FnlCompile* + +Diff compiles all indexed fennel files + + +:FnlCompile[!] *test-:FnlCompile* + +Diff compiles all indexed fennel files + + +:[range]CommandName *CommandName* + + +:[range]CommandName *test-:CommandName* + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/mapping_2.md b/tests/fixtures/render/mapping_2.md new file mode 100644 index 0000000..e9c14fb --- /dev/null +++ b/tests/fixtures/render/mapping_2.md @@ -0,0 +1,11 @@ +#### :FnlCompile[!] {doc=:FnlCompile} + +Diff compiles all indexed fennel files + +#### :FnlCompile[!] + +Diff compiles all indexed fennel files + +#### :[range]CommandName {doc=CommandName} + +#### :[range]CommandName diff --git a/tests/fixtures/render/mapping_2.txt b/tests/fixtures/render/mapping_2.txt new file mode 100644 index 0000000..a253006 --- /dev/null +++ b/tests/fixtures/render/mapping_2.txt @@ -0,0 +1,21 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +:FNLCOMPILE[!] + +Diff compiles all indexed fennel files + + +:FNLCOMPILE[!] + +Diff compiles all indexed fennel files + + +:[RANGE]COMMANDNAME + + +:[RANGE]COMMANDNAME + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/markdown_1.md b/tests/fixtures/render/markdown_1.md new file mode 100644 index 0000000..d49eede --- /dev/null +++ b/tests/fixtures/render/markdown_1.md @@ -0,0 +1,412 @@ +# panvimdoc + +
+ +
+ +
+ + + +"Double quoted string" + +> Testing block quote + +| testing line +| block + +![caption](image.png) + +% Title + spanning multiple lines +% Author One + Author Two; Author Three; + Author Four + +# Additional markdown reader tests + +## Blank line before URL in link reference + +[foo] and [bar] + +[foo]: + /url + +[bar]: +/url +"title" + +## Raw ConTeXt environments + +\placeformula \startformula + L_{1} = L_{2} + \stopformula + +\start[a2] +\start[a2] +\stop[a2] +\stop[a2] + +## Raw LaTeX environments + +\begin{center} +\begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt] +\Tree [.{S} [.NP John\index{i} ] [.VP [.V likes ] [.NP himself\index{i,*j} ]]] +\end{tikzpicture} +\end{center} + +## URLs with spaces and punctuation + +[foo](/bar and baz) +[foo](/bar + and baz ) +[foo]( /bar and baz ) +[foo](bar baz "title" ) + +[baz][] [bam][] [bork][] + +[baz]: /foo foo +[bam]: /foo fee +[bork]: /foo/zee zob (title) + +[Ward's method.](http://en.wikipedia.org/wiki/Ward's_method) + +## Horizontal rules with spaces at end + +* * * * * + +-- - -- -- - + +## Raw HTML before header + + + +### my header + +## $ in math + +$\$2 + \$3$ + +$x = \text{the $n$th root of $y$}$ + +This should not be math: + +$PATH 90 $PATH + +## Commented-out list item + +- one + +- three + +## Indented code at beginning of list + +- code + code + + 1. code + code + + 12345678. code + code + + - code + code + + - no code + +## Backslash newline + +hi\ +there + +## Code spans + +`hi\` + +`hi +there` + +`` hi````there `` + +`hi + +there` + +## helptags + +This content includes a helptag for `:h :a-complex.messy-%tag` inbetween other text. + +## Multilingual URLs + + + +[foo](/bar/测?x=测 "title") + +<测@foo.测.baz> + +## Numbered examples + +(@) First example. +(@foo) Second example. + +Explanation of examples (@foo) and (@bar). + +(@bar) Third example. + +## Macros + +\newcommand{\tuple}[1]{\langle #1 \rangle} + +$\tuple{x,y}$ + +## Case-insensitive references + +[Fum] + +[FUM] + +[bat] + +[fum]: /fum +[BAT]: /bat + +## Curly smart quotes + +“Hi” + +‘Hi’ + +## Consecutive lists + +- one +- two +1. one +2. two + + a. one + b. two + +## Implicit header references + +### My header + +### My other header + +A link to [My header]. + +Another link to [it][My header]. + +Should be [case insensitive][my header]. + +Link to [Explicit header attributes]. + +[my other header]: /foo + +But this is not a link to [My other header], since the reference is defined. + +## Explicit header attributes {#foobar .baz key="val"} + +> ## Header attributes inside block quote {#foobar .baz key="val"} + +## Line blocks + +| But can a bee be said to be +| or not to be an entire bee, +| when half the bee is not a bee, +| due to some ancient injury? +| +| Continuation + line +| and + another + +## Grid Tables + ++------------------+-----------+------------+ +| col 1 | col 2 | col 3 | ++==================+===========+============+ +| r1 a | b | c | +| r1 bis | b 2 | c 2 | ++------------------+-----------+------------+ +| r2 d | e | f | ++------------------+-----------+------------+ + +Headless + ++------------------+-----------+------------+ +| r1 a | b | c | +| r1 bis | b 2 | c 2 | ++------------------+-----------+------------+ +| r2 d | e | f | ++------------------+-----------+------------+ + +With alignments + ++------------------+-----------+------------+ +| col 1 | col 2 | col 3 | ++=================:+:==========+:==========:+ +| r1 a | b | c | +| r1 bis | b 2 | c 2 | ++------------------+-----------+------------+ +| r2 d | e | f | ++------------------+-----------+------------+ + +Headless with alignments + ++-----------------:+:----------+:----------:+ +| r1 a | b | c | +| r1 bis | b 2 | c 2 | ++------------------+-----------+------------+ +| r2 d | e | f | ++------------------+-----------+------------+ + +Spaces at ends of lines + ++------------------+-----------+------------+ +| r1 a | b | c | +| r1 bis | b 2 | c 2 | ++------------------+-----------+------------+ +| r2 d | e | f | ++------------------+-----------+------------+ + +Multiple blocks in a cell + ++------------------+-----------+------------+ +| # col 1 | # col 2 | # col 3 | +| col 1 | col 2 | col 3 | ++------------------+-----------+------------+ +| r1 a | - b | c | +| | - b 2 | c 2 | +| r1 bis | - b 2 | c 2 | ++------------------+-----------+------------+ + +East Asian characters have double width + ++--+----+ +|魚|fish| ++--+----+ + +Zero-width space in German + ++-------+-------+ +|German |English| ++-------+-------+ +|Auf‌lage|edition| ++-------+-------+ + +Zero-width non-joiner in Persian + ++-------+---------+ +|می‌خواهم|I want to| ++-------+---------+ + +Empty cells + ++---+---+ +| | | ++---+---+ + + +Table with cells spanning multiple rows or columns: + ++---------------------+----------+ +| Property | Earth | ++=============+=======+==========+ +| | min | -89.2 °C | +| Temperature +-------+----------+ +| 1961-1990 | mean | 14 °C | +| +-------+----------+ +| | min | 56.7 °C | ++-------------+-------+----------+ + +Table with complex header: + ++---------------------+-----------------------+ +| Location | Temperature 1961-1990 | +| | in degree Celsius | +| +-------+-------+-------+ +| | min | mean | max | ++=====================+=======+=======+=======+ +| Antarctica | -89.2 | N/A | 19.8 | ++---------------------+-------+-------+-------+ +| Earth | -89.2 | 14 | 56.7 | ++---------------------+-------+-------+-------+ + +## Entities in links and titles + +[link](/ürl "öö!") + + + + + +[foobar] + +[foobar]: /ürl "öö!" + +## Parentheses in URLs + +[link](/hi(there)) + +[link](/hithere\)) + +[linky] + +[linky]: hi_(there_(nested)) + +## Backslashes in link references + +[\*\a](b) + +## Reference link fallbacks + +[*not a link*] [*nope*]... + +## Reference link followed by a citation + +MapReduce is a paradigm popularized by [Google] [@mapreduce] as its +most vocal proponent. + +[Google]: http://google.com + +## Empty reference links + +[foo2]: + +bar + +[foo2] + +## Wrapping + +- blah blah blah blah blah blah blah blah blah blah blah blah blah blah 2015. + +## Bracketed spans + +[*foo* bar baz [link](url)]{.class #id key=val} + +## panvimdoc-include-comment + + + + diff --git a/tests/fixtures/render/markdown_1.txt b/tests/fixtures/render/markdown_1.txt new file mode 100644 index 0000000..792d836 --- /dev/null +++ b/tests/fixtures/render/markdown_1.txt @@ -0,0 +1,11 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +1. panvimdoc *test-panvimdoc* + + + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/para_1.md b/tests/fixtures/render/para_1.md new file mode 100644 index 0000000..4c8fcdf --- /dev/null +++ b/tests/fixtures/render/para_1.md @@ -0,0 +1,3 @@ +Pandoc supports definition lists: . +This can be used to generate documentation of mappings. +All of the content in curly braces `{...}` that is part of the header is dropped and a tag is created. diff --git a/test/para.jl b/tests/fixtures/render/para_1.txt similarity index 51% rename from test/para.jl rename to tests/fixtures/render/para_1.txt index e91a39c..5e7c001 100644 --- a/test/para.jl +++ b/tests/fixtures/render/para_1.txt @@ -1,15 +1,5 @@ -@testset "para" begin - doc = test_pandoc( - raw""" -Pandoc supports definition lists: . -This can be used to generate documentation of mappings. -All of the content in curly braces `{...}` that is part of the header is dropped and a tag is created. - """; - toc = false, - demojify = true, - ) - @test with_current_title(raw""" *test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 Pandoc supports definition lists: . This can be used to generate @@ -19,5 +9,3 @@ part of the header is dropped and a tag is created. Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/tests/fixtures/render/tables_1.md b/tests/fixtures/render/tables_1.md new file mode 100644 index 0000000..2cfa3f2 --- /dev/null +++ b/tests/fixtures/render/tables_1.md @@ -0,0 +1,100 @@ + Right Left Center Default +------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + +Table: Demonstration of simple table syntax. + +------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 +------- ------ ---------- ------- + +------------------------------------------------------------- + Centered Default Right Left + Header Aligned Aligned Aligned +----------- ------- --------------- ------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between + rows. +------------------------------------------------------------- + +Table: Here's the caption. It, too, may span +multiple lines. + +----------- ------- --------------- ------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between + rows. +----------- ------- --------------- ------------------------- + +: Here's a multiline table without a header. + + +: Sample grid table. + ++---------------+---------------+--------------------+ +| Fruit | Price | Advantages | ++===============+===============+====================+ +| Bananas | $1.34 | - built-in wrapper | +| | | - bright color | ++---------------+---------------+--------------------+ +| Oranges | $2.10 | - cures scurvy | +| | | - tasty | ++---------------+---------------+--------------------+ + +Cells can span multiple columns or rows: + ++---------------------+----------+ +| Property | Earth | ++=============+=======+==========+ +| | min | -89.2 °C | +| Temperature +-------+----------+ +| 1961-1990 | mean | 14 °C | +| +-------+----------+ +| | min | 56.7 °C | ++-------------+-------+----------+ + +A table header may contain more than one row: + ++---------------------+-----------------------+ +| Location | Temperature 1961-1990 | +| | in degree Celsius | +| +-------+-------+-------+ +| | min | mean | max | ++=====================+=======+=======+=======+ +| Antarctica | -89.2 | N/A | 19.8 | ++---------------------+-------+-------+-------+ +| Earth | -89.2 | 14 | 56.7 | ++---------------------+-------+-------+-------+ + ++---------------+---------------+--------------------+ +| Right | Left | Centered | ++==============:+:==============+:==================:+ +| Bananas | $1.34 | built-in wrapper | ++---------------+---------------+--------------------+ + +| Right | Left | Default | Center | +|------:|:-----|---------|:------:| +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | + +fruit| price +-----|-----: +apple|2.05 +pear|1.37 +orange|3.09 + +| One | Two | +|-----+-------| +| my | table | +| is | nice | diff --git a/tests/fixtures/render/tables_1.txt b/tests/fixtures/render/tables_1.txt new file mode 100644 index 0000000..a1595c8 --- /dev/null +++ b/tests/fixtures/render/tables_1.txt @@ -0,0 +1,97 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + ----- ----- ----- ----- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + ----- ----- ----- ----- + --------------------------------------------------------------- + Centered Default Right Aligned Left Aligned + Header Aligned + ----------- --------- --------------- ------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here’s another one. Note + the blank line between + rows. + --------------------------------------------------------------- + + : Here’s the caption. It, too, may span multiple lines. + ----------- ------- --------------- ------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here’s another one. Note + the blank line between + rows. + ----------- ------- --------------- ------------------------- + + : Here’s a multiline table without a header. ++---------------+---------------+--------------------+ +| Fruit | Price | Advantages | ++===============+===============+====================+ +| Bananas | $1.34 | - built-in wrapper | +| | | - bright color | ++---------------+---------------+--------------------+ +| Oranges | $2.10 | - cures scurvy | +| | | - tasty | ++---------------+---------------+--------------------+ + +: Sample grid table. +Cells can span multiple columns or rows: + ++--------------------------+----------+ +| Property | Earth | ++=============+============+==========+ +| Temperature | min | -89.2 °C | +| 1961-1990 | | | +| +------------+----------+ +| | mean | 14 °C | +| +------------+----------+ +| | min | 56.7 °C | ++-------------+------------+----------+ +A table header may contain more than one row: + ++---------------------+-----------------------------+ +| Location | Temperature 1961-1990 in | +| | degree Celsius | +| +---------+---------+---------+ +| | min | mean | max | ++=====================+=========+=========+=========+ +| Antarctica | -89.2 | N/A | 19.8 | ++---------------------+---------+---------+---------+ +| Earth | -89.2 | 14 | 56.7 | ++---------------------+---------+---------+---------+ + ---------------------------------------------------- + Right Left Centered + --------------- --------------- -------------------- + Bananas $1.34 built-in wrapper + + ---------------------------------------------------- + Right Left Default Center + ------- ------ --------- -------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + fruit price + -------- ------- + apple 2.05 + pear 1.37 + orange 3.09 + One Two + ----- ------- + my table + is nice + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/toc-emojis_1.md b/tests/fixtures/render/toc-emojis_1.md new file mode 100644 index 0000000..e431118 --- /dev/null +++ b/tests/fixtures/render/toc-emojis_1.md @@ -0,0 +1,37 @@ +## :sparkles: Features + +## :zap: Requirements + +## :package: Installation + +### Telescope extension + +### Lazy loading + +## :rocket: Usage + +## :wrench: Configuration + +### Defaults + +### Session options + +### Session save location + +### Git branching + +### Autosaving + +### Autoloading + +### Following current working directory + +### Allowed directories + +### Ignored directories + +### Events / Callbacks + +### Telescope extension + +## :page_with_curl: License diff --git a/test/toc-emojis.jl b/tests/fixtures/render/toc-emojis_1.txt similarity index 71% rename from test/toc-emojis.jl rename to tests/fixtures/render/toc-emojis_1.txt index ac1f363..54cf95d 100644 --- a/test/toc-emojis.jl +++ b/tests/fixtures/render/toc-emojis_1.txt @@ -1,51 +1,5 @@ -@testset "markdown" begin - doc = test_pandoc( - raw""" -## :sparkles: Features - -## :zap: Requirements - -## :package: Installation - -### Telescope extension - -### Lazy loading - -## :rocket: Usage - -## :wrench: Configuration - -### Defaults - -### Session options - -### Session save location - -### Git branching - -### Autosaving - -### Autoloading - -### Following current working directory - -### Allowed directories - -### Ignored directories - -### Events / Callbacks - -### Telescope extension - -## :page_with_curl: License - - """; - toc = true, - demojify = true, - dedup_subheadings = true, - ) - @test with_current_title(raw""" *test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 ============================================================================== Table of Contents *test-table-of-contents* @@ -116,5 +70,3 @@ LICENSE *test-license* Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/tests/fixtures/render/toc_1.md b/tests/fixtures/render/toc_1.md new file mode 100644 index 0000000..50b2268 --- /dev/null +++ b/tests/fixtures/render/toc_1.md @@ -0,0 +1,12 @@ +# panvimdoc + +# TLDR + +![caption](image.png) + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/test/toc.jl b/tests/fixtures/render/toc_1.txt similarity index 53% rename from test/toc.jl rename to tests/fixtures/render/toc_1.txt index 4566acd..539fd18 100644 --- a/test/toc.jl +++ b/tests/fixtures/render/toc_1.txt @@ -1,24 +1,5 @@ - -@testset "toc" begin - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ![caption](image.png) - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - toc = true, - ) - @test with_current_title(""" *test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 ============================================================================== Table of Contents *test-table-of-contents* @@ -60,56 +41,3 @@ SUMMARY 2 *test-summary-2* Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc - - doc = test_pandoc( - """ - # panvimdoc - - # TLDR - - ![caption](image.png) - - ## Summary 1 - ## Summary 2 - - # Motivation - - # References - """; - toc = false, - ) - @test with_current_title(""" -*test.txt* Test Description - -============================================================================== -1. panvimdoc *test-panvimdoc* - - -============================================================================== -2. TLDR *test-tldr* - - -SUMMARY 1 *test-summary-1* - - -SUMMARY 2 *test-summary-2* - - -============================================================================== -3. Motivation *test-motivation* - - -============================================================================== -4. References *test-references* - -============================================================================== -5. Links *test-links* - -1. *caption*: image.png - -Generated by panvimdoc - -vim:tw=78:ts=8:noet:ft=help:norl: -""") == doc -end diff --git a/tests/fixtures/render/toc_2.md b/tests/fixtures/render/toc_2.md new file mode 100644 index 0000000..50b2268 --- /dev/null +++ b/tests/fixtures/render/toc_2.md @@ -0,0 +1,12 @@ +# panvimdoc + +# TLDR + +![caption](image.png) + +## Summary 1 +## Summary 2 + +# Motivation + +# References diff --git a/tests/fixtures/render/toc_2.txt b/tests/fixtures/render/toc_2.txt new file mode 100644 index 0000000..4cc0b15 --- /dev/null +++ b/tests/fixtures/render/toc_2.txt @@ -0,0 +1,32 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +1. panvimdoc *test-panvimdoc* + + +============================================================================== +2. TLDR *test-tldr* + + +SUMMARY 1 *test-summary-1* + + +SUMMARY 2 *test-summary-2* + + +============================================================================== +3. Motivation *test-motivation* + + +============================================================================== +4. References *test-references* + +============================================================================== +5. Links *test-links* + +1. *caption*: image.png + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/treesitter_1.md b/tests/fixtures/render/treesitter_1.md new file mode 100644 index 0000000..d7b552c --- /dev/null +++ b/tests/fixtures/render/treesitter_1.md @@ -0,0 +1,12 @@ +Here's a YAML codeblock: + +```yaml +name: panvimdoc +on: [push] +jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +``` diff --git a/tests/fixtures/render/treesitter_1.txt b/tests/fixtures/render/treesitter_1.txt new file mode 100644 index 0000000..f1cab52 --- /dev/null +++ b/tests/fixtures/render/treesitter_1.txt @@ -0,0 +1,22 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Here’s a YAML codeblock: + +>yaml + name: panvimdoc + on: [push] + jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +< + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render/treesitter_2.md b/tests/fixtures/render/treesitter_2.md new file mode 100644 index 0000000..d7b552c --- /dev/null +++ b/tests/fixtures/render/treesitter_2.md @@ -0,0 +1,12 @@ +Here's a YAML codeblock: + +```yaml +name: panvimdoc +on: [push] +jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +``` diff --git a/tests/fixtures/render/treesitter_2.txt b/tests/fixtures/render/treesitter_2.txt new file mode 100644 index 0000000..14b896f --- /dev/null +++ b/tests/fixtures/render/treesitter_2.txt @@ -0,0 +1,22 @@ +*test.txt* Test Description + For NVIM v0.8.0 Last change: 2026 April 12 + +============================================================================== +Table of Contents *test-table-of-contents* + +Here’s a YAML codeblock: + +> + name: panvimdoc + on: [push] + jobs: + docs: + runs-on: ubuntu-latest + name: pandoc to vimdoc + steps: + - uses: actions/checkout@v2 +< + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/render_cases.json b/tests/fixtures/render_cases.json new file mode 100644 index 0000000..3f6e666 --- /dev/null +++ b/tests/fixtures/render_cases.json @@ -0,0 +1,416 @@ +[ + { + "name": "dedupheadings_1", + "input": "fixtures/render/dedupheadings_1.md", + "expected": "fixtures/render/dedupheadings_1.txt", + "options": { + "toc": true, + "dedup_subheadings": true, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "definition-lists_1", + "input": "fixtures/render/definition-lists_1.md", + "expected": "fixtures/render/definition-lists_1.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "definition-lists_2", + "input": "fixtures/render/definition-lists_2.md", + "expected": "fixtures/render/definition-lists_2.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": false + } + }, + { + "name": "demojify_1", + "input": "fixtures/render/demojify_1.md", + "expected": "fixtures/render/demojify_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "demojify_2", + "input": "fixtures/render/demojify_2.md", + "expected": "fixtures/render/demojify_2.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "demojify_3", + "input": "fixtures/render/demojify_3.md", + "expected": "fixtures/render/demojify_3.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "description_1", + "input": "fixtures/render/description_1.md", + "expected": "fixtures/render/description_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": null, + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "description_2", + "input": "fixtures/render/description_2.md", + "expected": "fixtures/render/description_2.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": null, + "vimversion": "VIM v9.0.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "headinglevelsby_1", + "input": "fixtures/render/headinglevelsby_1.md", + "expected": "fixtures/render/headinglevelsby_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "headinglevelsby_2", + "input": "fixtures/render/headinglevelsby_2.md", + "expected": "fixtures/render/headinglevelsby_2.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 2, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "headinglevelsby_3", + "input": "fixtures/render/headinglevelsby_3.md", + "expected": "fixtures/render/headinglevelsby_3.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 1, + "increment_heading_level_by": 2, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "ignore_rawblock_1", + "input": "fixtures/render/ignore_rawblock_1.md", + "expected": "fixtures/render/ignore_rawblock_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "ignore_rawblock_2", + "input": "fixtures/render/ignore_rawblock_2.md", + "expected": "fixtures/render/ignore_rawblock_2.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": false, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "mapping_1", + "input": "fixtures/render/mapping_1.md", + "expected": "fixtures/render/mapping_1.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "mapping_2", + "input": "fixtures/render/mapping_2.md", + "expected": "fixtures/render/mapping_2.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": false, + "doc_mapping_project_name": true + } + }, + { + "name": "markdown_1", + "input": "fixtures/render/markdown_1.md", + "expected": "fixtures/render/markdown_1.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "para_1", + "input": "fixtures/render/para_1.md", + "expected": "fixtures/render/para_1.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "tables_1", + "input": "fixtures/render/tables_1.md", + "expected": "fixtures/render/tables_1.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "toc-emojis_1", + "input": "fixtures/render/toc-emojis_1.md", + "expected": "fixtures/render/toc-emojis_1.txt", + "options": { + "toc": true, + "dedup_subheadings": true, + "treesitter": true, + "demojify": true, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "toc_1", + "input": "fixtures/render/toc_1.md", + "expected": "fixtures/render/toc_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "toc_2", + "input": "fixtures/render/toc_2.md", + "expected": "fixtures/render/toc_2.txt", + "options": { + "toc": false, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "treesitter_1", + "input": "fixtures/render/treesitter_1.md", + "expected": "fixtures/render/treesitter_1.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": true, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + }, + { + "name": "treesitter_2", + "input": "fixtures/render/treesitter_2.md", + "expected": "fixtures/render/treesitter_2.txt", + "options": { + "toc": true, + "dedup_subheadings": false, + "treesitter": false, + "demojify": false, + "description": "Test Description", + "vimversion": "NVIM v0.8.0", + "ignore_rawblocks": true, + "shift_heading_level_by": 0, + "increment_heading_level_by": 0, + "doc_mapping": true, + "doc_mapping_project_name": true + } + } +] diff --git a/tests/test_panvimdoc.py b/tests/test_panvimdoc.py new file mode 100644 index 0000000..cf8b8d0 --- /dev/null +++ b/tests/test_panvimdoc.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +import subprocess +import tempfile +from pathlib import Path + +import pytest # pyright: ignore[reportMissingImports] +from pydantic import BaseModel, ConfigDict, TypeAdapter + +ROOT = Path(__file__).resolve().parents[1] +TESTS_DIR = Path(__file__).resolve().parent +CASES_PATH = TESTS_DIR / "fixtures" / "render_cases.json" +TEST_DATE = "2026 April 12" + + +class RenderOptions(BaseModel): + model_config = ConfigDict(frozen=True) + + toc: bool + dedup_subheadings: bool + treesitter: bool + demojify: bool + description: str | None + vimversion: str + ignore_rawblocks: bool + shift_heading_level_by: int + increment_heading_level_by: int + doc_mapping: bool + doc_mapping_project_name: bool + + +class RenderCase(BaseModel): + model_config = ConfigDict(frozen=True) + + name: str + input: str + expected: str + options: RenderOptions + + @property + def input_path(self) -> Path: + return TESTS_DIR / self.input + + @property + def expected_path(self) -> Path: + return TESTS_DIR / self.expected + + +def load_render_cases() -> list[RenderCase]: + return TypeAdapter(list[RenderCase]).validate_json( + CASES_PATH.read_text(encoding="utf-8") + ) + + +def metadata_arg(key: str, value: str | bool | int) -> str: + rendered = str(value).lower() if isinstance(value, bool) else str(value) + return f"--metadata={key}:{rendered}" + + +def normalize_output(text: str) -> str: + return "\n".join(line.rstrip() for line in text.split("\n")) + + +def render_markdown(markdown: str, options: RenderOptions) -> str: + with tempfile.TemporaryDirectory() as tmpdir: + tmpdir_path = Path(tmpdir) + input_path = tmpdir_path / "input.md" + output_path = tmpdir_path / "output.txt" + input_path.write_text(markdown, encoding="utf-8") + + command = [ + "pandoc", + "--citeproc", + f"--shift-heading-level-by={options.shift_heading_level_by}", + metadata_arg("project", "test"), + metadata_arg("vimversion", options.vimversion), + metadata_arg("toc", options.toc), + metadata_arg("dedupsubheadings", options.dedup_subheadings), + metadata_arg("treesitter", options.treesitter), + metadata_arg("ignorerawblocks", options.ignore_rawblocks), + metadata_arg("incrementheadinglevelby", options.increment_heading_level_by), + metadata_arg("docmappingproject", options.doc_mapping_project_name), + metadata_arg("docmapping", options.doc_mapping), + metadata_arg("date", TEST_DATE), + f"--lua-filter={ROOT / 'scripts' / 'skip-blocks.lua'}", + f"--lua-filter={ROOT / 'scripts' / 'include-files.lua'}", + ] + if options.description is not None: + command.append(metadata_arg("description", options.description)) + if options.demojify: + command.extend( + [ + f"--data-dir={ROOT / 'lib'}", + f"--lua-filter={ROOT / 'scripts' / 'remove-emojis.lua'}", + ] + ) + command.extend( + [ + "-t", + str(ROOT / "scripts" / "panvimdoc.lua"), + str(input_path), + "-o", + str(output_path), + ] + ) + + completed = subprocess.run( + command, + cwd=ROOT, + capture_output=True, + check=False, + text=True, + ) + if completed.returncode != 0: + raise AssertionError( + f"pandoc failed for {input_path.name}\nstdout:\n{completed.stdout}\nstderr:\n{completed.stderr}" + ) + return normalize_output(output_path.read_text(encoding="utf-8")) + + +RENDER_CASES = load_render_cases() + + +@pytest.mark.parametrize("case", RENDER_CASES, ids=[case.name for case in RENDER_CASES]) +def test_render_cases(case: RenderCase) -> None: + actual = render_markdown(case.input_path.read_text(encoding="utf-8"), case.options) + expected = case.expected_path.read_text(encoding="utf-8") + assert actual == expected + + +def test_help_usage() -> None: + completed = subprocess.run( + [str(ROOT / "panvimdoc.sh"), "-h"], + cwd=ROOT, + capture_output=True, + check=False, + text=True, + ) + assert completed.returncode == 0, completed.stderr + assert "Usage:" in completed.stdout + assert "Arguments:" in completed.stdout diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..a628de7 --- /dev/null +++ b/uv.lock @@ -0,0 +1,270 @@ +version = 1 +revision = 3 +requires-python = ">=3.13" + +[[package]] +name = "annotated-types" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "attrs" +version = "26.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "cyclopts" +version = "4.10.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "docstring-parser" }, + { name = "rich" }, + { name = "rich-rst" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/2c/fced34890f6e5a93a4b7afb2c71e8eee2a0719fb26193a0abf159ecb714d/cyclopts-4.10.2.tar.gz", hash = "sha256:d7b950457ef2563596d56331f80cbbbf86a2772535fb8b315c4f03bc7e6127f1", size = 166664, upload-time = "2026-04-08T23:57:45.805Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b4/bd/05055d8360cef0757d79367157f3b15c0a0715e81e08f86a04018ec045f0/cyclopts-4.10.2-py3-none-any.whl", hash = "sha256:a1f2d6f8f7afac9456b48f75a40b36658778ddc9c6d406b520d017ae32c990fe", size = 204314, upload-time = "2026-04-08T23:57:46.969Z" }, +] + +[[package]] +name = "docstring-parser" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912", size = 27442, upload-time = "2025-07-21T07:35:01.868Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" }, +] + +[[package]] +name = "docutils" +version = "0.22.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/b6/03bb70946330e88ffec97aefd3ea75ba575cb2e762061e0e62a213befee8/docutils-0.22.4.tar.gz", hash = "sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968", size = 2291750, upload-time = "2025-12-18T19:00:26.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/10/5da547df7a391dcde17f59520a231527b8571e6f46fc8efb02ccb370ab12/docutils-0.22.4-py3-none-any.whl", hash = "sha256:d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de", size = 633196, upload-time = "2025-12-18T19:00:18.077Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "markdown-it-py" +version = "4.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] +name = "panvimdoc" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "cyclopts" }, + { name = "pydantic" }, + { name = "pytest" }, + { name = "rich" }, +] + +[package.metadata] +requires-dist = [ + { name = "cyclopts", specifier = ">=4.10.2" }, + { name = "pydantic", specifier = ">=2.12.5" }, + { name = "pytest", specifier = ">=9.0.3" }, + { name = "rich", specifier = ">=15.0.0" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, +] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, + { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, + { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, + { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, +] + +[[package]] +name = "pygments" +version = "2.20.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" }, +] + +[[package]] +name = "pytest" +version = "9.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz", hash = "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c", size = 1572165, upload-time = "2026-04-07T17:16:18.027Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl", hash = "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9", size = 375249, upload-time = "2026-04-07T17:16:16.13Z" }, +] + +[[package]] +name = "rich" +version = "15.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, +] + +[[package]] +name = "rich-rst" +version = "1.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/6d/a506aaa4a9eaa945ed8ab2b7347859f53593864289853c5d6d62b77246e0/rich_rst-1.3.2.tar.gz", hash = "sha256:a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4", size = 14936, upload-time = "2025-10-14T16:49:45.332Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/13/2f/b4530fbf948867702d0a3f27de4a6aab1d156f406d72852ab902c4d04de9/rich_rst-1.3.2-py3-none-any.whl", hash = "sha256:a99b4907cbe118cf9d18b0b44de272efa61f15117c61e39ebdc431baf5df722a", size = 12567, upload-time = "2025-10-14T16:49:42.953Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, +] From a86479d6175faaea1fd6971585597be0c1727145 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:26:46 -0400 Subject: [PATCH 02/16] test: add tests for current Neovim version detection in render functions --- tests/test_panvimdoc.py | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/tests/test_panvimdoc.py b/tests/test_panvimdoc.py index cf8b8d0..22a13b8 100644 --- a/tests/test_panvimdoc.py +++ b/tests/test_panvimdoc.py @@ -46,6 +46,21 @@ def expected_path(self) -> Path: return TESTS_DIR / self.expected +DEFAULT_RENDER_OPTIONS = RenderOptions( + toc=True, + dedup_subheadings=False, + treesitter=True, + demojify=False, + description="Test Description", + vimversion="NVIM v0.8.0", + ignore_rawblocks=True, + shift_heading_level_by=0, + increment_heading_level_by=0, + doc_mapping=True, + doc_mapping_project_name=True, +) + + def load_render_cases() -> list[RenderCase]: return TypeAdapter(list[RenderCase]).validate_json( CASES_PATH.read_text(encoding="utf-8") @@ -61,6 +76,22 @@ def normalize_output(text: str) -> str: return "\n".join(line.rstrip() for line in text.split("\n")) +def current_neovim_version() -> str: + completed = subprocess.run( + ["nvim", "--version"], + cwd=ROOT, + capture_output=True, + check=False, + text=True, + ) + if completed.returncode != 0: + raise AssertionError(f"nvim --version failed:\n{completed.stderr}") + first_line = completed.stdout.splitlines()[0] + if "-dev" in first_line: + return first_line.split("-dev", maxsplit=1)[0] + return first_line + + def render_markdown(markdown: str, options: RenderOptions) -> str: with tempfile.TemporaryDirectory() as tmpdir: tmpdir_path = Path(tmpdir) @@ -139,3 +170,77 @@ def test_help_usage() -> None: assert completed.returncode == 0, completed.stderr assert "Usage:" in completed.stdout assert "Arguments:" in completed.stdout + + +def test_render_uses_current_neovim_version_when_vimversion_is_empty() -> None: + actual = render_markdown( + "# panvimdoc\n", + DEFAULT_RENDER_OPTIONS.model_copy( + update={"description": None, "vimversion": ""} + ), + ) + lines = actual.splitlines() + assert lines[0] == "*test.txt*" + assert lines[1].endswith( + f"For {current_neovim_version()} Last change: {TEST_DATE}" + ) + + +def test_panvimdoc_shell_uses_current_neovim_version_when_vimversion_is_omitted() -> ( + None +): + project_name = "test-current-neovim" + output_path = ROOT / "doc" / f"{project_name}.txt" + + with tempfile.TemporaryDirectory() as tmpdir: + input_path = Path(tmpdir) / "input.md" + input_path.write_text("# panvimdoc\n", encoding="utf-8") + + if output_path.exists(): + output_path.unlink() + + completed = subprocess.run( + [ + str(ROOT / "panvimdoc.sh"), + "--project-name", + project_name, + "--input-file", + str(input_path), + "--toc", + "true", + "--description", + "", + "--dedup-subheadings", + "false", + "--treesitter", + "true", + "--ignore-rawblocks", + "true", + "--doc-mapping", + "true", + "--doc-mapping-project-name", + "true", + "--demojify", + "false", + "--shift-heading-level-by", + "0", + "--increment-heading-level-by", + "0", + "--scripts-dir", + str(ROOT / "scripts"), + ], + cwd=ROOT, + capture_output=True, + check=False, + text=True, + ) + try: + assert completed.returncode == 0, completed.stderr + actual = normalize_output(output_path.read_text(encoding="utf-8")) + finally: + if output_path.exists(): + output_path.unlink() + + lines = actual.splitlines() + assert lines[0] == f"*{project_name}.txt*" + assert f"For {current_neovim_version()} Last change:" in lines[1] From e69c5983a582d91fba5c00ed665508f51b0c468f Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:32:43 -0400 Subject: [PATCH 03/16] refactor(panvimdoc): update scripts dir resolution logic and usage doc --- panvimdoc.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/panvimdoc.sh b/panvimdoc.sh index fa2e3cd..1693991 100755 --- a/panvimdoc.sh +++ b/panvimdoc.sh @@ -22,7 +22,7 @@ Arguments: --doc-mapping-project-name: 'true' if tags generated for mapping docs contain project name, 'false' otherwise --shift-heading-level-by: 0 if you don't want to shift heading levels , n otherwise --increment-heading-level-by: 0 if don't want to increment the starting heading number, n otherwise - --scripts-dir: '/scripts' if 'GITHUB_ACTIONS=true' or '.dockerenv' is present, '$0/scripts' if no argument is passed, scripts directory otherwise + --scripts-dir: overrides the scripts directory; otherwise panvimdoc uses the scripts directory next to this file and falls back to '/scripts' EOF exit 0 } @@ -117,15 +117,19 @@ while [[ $# -gt 0 ]]; do esac done -# If the user provided a scripts directory, use that. Otherwise, determine environment. -if [[ "${GITHUB_ACTIONS:-false}" == "true" || -f /.dockerenv ]]; then - # GitHub Actions or Docker +# If the user provided a scripts directory, use that. Otherwise prefer the +# scripts directory next to this file and fall back to the Docker action path. +SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" +DEFAULT_SCRIPTS_DIR="$SCRIPT_DIR/scripts" + +if [[ -n "${SCRIPTS_DIR:-}" ]]; then + : +elif [[ -d "$DEFAULT_SCRIPTS_DIR" ]]; then + SCRIPTS_DIR="$DEFAULT_SCRIPTS_DIR" +elif [[ -d "/scripts" ]]; then SCRIPTS_DIR="/scripts" -elif [[ -n "${SCRIPTS_DIR:-}" ]]; then - SCRIPTS_DIR="$SCRIPTS_DIR" else - # Use the scripts directory alongside the script's location - SCRIPTS_DIR="$(dirname "$(readlink -f "$0")")/scripts" + SCRIPTS_DIR="$DEFAULT_SCRIPTS_DIR" fi # If the scripts folder doesn't exist, throw an error From 28bf4b0e6c3fc2b8f497907ffeebc5a2119aa743 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:32:44 -0400 Subject: [PATCH 04/16] fix(panvimdoc): normalize special spaces in inline string handling --- scripts/panvimdoc.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/panvimdoc.lua b/scripts/panvimdoc.lua index f5c033a..c0194ef 100644 --- a/scripts/panvimdoc.lua +++ b/scripts/panvimdoc.lua @@ -24,6 +24,10 @@ function string.ends_with(str, ends) return ends == "" or str:sub(-#ends) == ends end +local function normalize_spaces(str) + return str:gsub("\u{00A0}", " "):gsub("\u{FFFD}", " ") +end + local function empty(s) return s == nil or #s == 0 end @@ -409,7 +413,7 @@ Writer.Block.CodeBlock = function(el) end Writer.Inline.Str = function(el) - local s = stringify(el) + local s = normalize_spaces(stringify(el)) if string.starts_with(s, "(http") and string.ends_with(s, ")") then return " <" .. string.sub(s, 2, #s - 2) .. ">" else From 185c841e31197dd3cf8503713413cee27b1b6f77 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:32:48 -0400 Subject: [PATCH 05/16] docs(panvimdoc): update formatting and descriptions in Vimdoc file --- doc/panvimdoc.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/panvimdoc.txt b/doc/panvimdoc.txt index d9529bb..fa9519a 100644 --- a/doc/panvimdoc.txt +++ b/doc/panvimdoc.txt @@ -1,4 +1,4 @@ -*panvimdoc.txt* +*panvimdoc.txt* Convert Markdown docs to Vimdoc For NVIM v0.8.0 Last change: 2026 April 12 ============================================================================== @@ -628,7 +628,7 @@ Notice that the tag `*projectName-:Command*` is generated for you. Additionally, content in square brackets `[...]` or curly brackets `{...}` is also dropped for creating the tag name. -i.e. the term `### :[range]Command` becomes the tag `*projectName-:Command*`. +i.e. the term `### :[range]Command` becomes the tag `*projectName-:Command*`. See following mappings as examples: @@ -652,7 +652,9 @@ pvd Command that takes [count] lines. *panvimdoc-:CommandName* -:[range]CommandName {doc=CommandName} Command that operates over [range]. +:[range]CommandName {doc=CommandName} > + Command that operates over [range]. + < @@ -660,7 +662,9 @@ pvd Command that takes [count] lines. *panvimdoc-pv* -{Visual}pv Command that operates over highlighted lines. +{Visual}pv > + Command that operates over highlighted lines. + < From 8195955bba879dd1e3fcb7597a6e695c8ccceb58 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:32:54 -0400 Subject: [PATCH 06/16] docs(panvimdoc): normalize blank lines in code and comment examples --- doc/panvimdoc.txt | 98 +++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/doc/panvimdoc.txt b/doc/panvimdoc.txt index fa9519a..4aff7bf 100644 --- a/doc/panvimdoc.txt +++ b/doc/panvimdoc.txt @@ -56,17 +56,17 @@ Generate documentation in vimdoc. >yaml name: panvimdoc - + on: push: branches: [main] paths: - - README.md - - .github/workflows/panvimdoc.yml - + - README.md + - .github/workflows/panvimdoc.yml + permissions: contents: write - + jobs: docs: runs-on: ubuntu-latest @@ -121,9 +121,9 @@ Then add the following to `./.github/workflows/panvimdoc.yml`: >yaml name: panvimdoc - + on: [push] - + jobs: docs: runs-on: ubuntu-latest @@ -171,9 +171,9 @@ suggested in Vim’s `|help-writing|` > The first line in a help file should have the following format: - + *plugin_name.txt* {short description of the plugin} - + The first field is a help tag where ":help plugin_name" will jump to. The remainder of the line, after a Tab, describes the plugin purpose in a short way. This will show up in the "LOCAL ADDITIONS" section of the main help @@ -213,14 +213,14 @@ Here’s an example: >yml name: docs - + on: push: branches: main - + permissions: contents: write - + jobs: publish-gh-page: runs-on: ubuntu-latest @@ -297,7 +297,7 @@ output writer. >bash $ ./panvimdoc.sh Usage: ./panvimdoc.sh --project-name PROJECT_NAME --input-file INPUT_FILE --vim-version VIM_VERSION --toc TOC --description DESCRIPTION --dedup-subheadings DEDUP_SUBHEADINGS --treesitter TREESITTER - + Arguments: --project-name: the name of the project --input-file: the input markdown file @@ -469,9 +469,9 @@ CODEBLOCKS *panvimdoc-specification-codeblocks* > Multi line Code blocks are indented 4 spaces and - + are formatted - + appropriately with > and <. < @@ -574,51 +574,51 @@ For example, the following in a markdown file: >markdown :FnlCompileBuffer - + : Compiles current active fennel buffer - + :FnlCompile[!] - + : Diff compiles all indexed fennel files If bang! is present then forcefully compiles all `source` files - + :Fnl {expr} - + : Executes and Evalutate {expr} of fennel - + ```fennel :Fnl (print "Hello World") - + :Fnl (values some_var) ``` - + Testing < becomes the following vimdoc: > - + *projectName-:FnlCompileBuffer* - - + + :FnlCompileBuffer Compiles current active fennel buffer - - + + *projectName-:FnlCompile* - - + + :FnlCompile[!] Diff compiles all indexed fennel files If bang! is present then forcefully compiles all `source` files - - + + *projectName-:Fnl* - - + + :Fnl {expr} Executes and Evalutate {expr} of fennel >fennel :Fnl (print "Hello World") - + :Fnl (values some_var) < Testing @@ -734,15 +734,15 @@ inside `panvimdoc-ignore-{start/end}` blocks: > - +
Vimdoc Ignored Section - + This section will ignored when generating the vimdoc file. This will only show up in the Markdown file. - +
- + < @@ -767,9 +767,9 @@ because it may cause the rest of your document to be ignored. Do this instead: > - + ![screenshot](./gif.gif) - + < @@ -785,23 +785,23 @@ As with markdown only content, you must include a blank link before and after the comment. >markdown - + - + < From d6065f631a3ba400cdd6df287b4f8964a6b90219 Mon Sep 17 00:00:00 2001 From: kdheepak Date: Sun, 12 Apr 2026 11:33:05 +0000 Subject: [PATCH 07/16] Auto generate docs --- doc/panvimdoc.txt | 98 +++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/doc/panvimdoc.txt b/doc/panvimdoc.txt index 4aff7bf..fa9519a 100644 --- a/doc/panvimdoc.txt +++ b/doc/panvimdoc.txt @@ -56,17 +56,17 @@ Generate documentation in vimdoc. >yaml name: panvimdoc - + on: push: branches: [main] paths: - - README.md - - .github/workflows/panvimdoc.yml - + - README.md + - .github/workflows/panvimdoc.yml + permissions: contents: write - + jobs: docs: runs-on: ubuntu-latest @@ -121,9 +121,9 @@ Then add the following to `./.github/workflows/panvimdoc.yml`: >yaml name: panvimdoc - + on: [push] - + jobs: docs: runs-on: ubuntu-latest @@ -171,9 +171,9 @@ suggested in Vim’s `|help-writing|` > The first line in a help file should have the following format: - + *plugin_name.txt* {short description of the plugin} - + The first field is a help tag where ":help plugin_name" will jump to. The remainder of the line, after a Tab, describes the plugin purpose in a short way. This will show up in the "LOCAL ADDITIONS" section of the main help @@ -213,14 +213,14 @@ Here’s an example: >yml name: docs - + on: push: branches: main - + permissions: contents: write - + jobs: publish-gh-page: runs-on: ubuntu-latest @@ -297,7 +297,7 @@ output writer. >bash $ ./panvimdoc.sh Usage: ./panvimdoc.sh --project-name PROJECT_NAME --input-file INPUT_FILE --vim-version VIM_VERSION --toc TOC --description DESCRIPTION --dedup-subheadings DEDUP_SUBHEADINGS --treesitter TREESITTER - + Arguments: --project-name: the name of the project --input-file: the input markdown file @@ -469,9 +469,9 @@ CODEBLOCKS *panvimdoc-specification-codeblocks* > Multi line Code blocks are indented 4 spaces and - + are formatted - + appropriately with > and <. < @@ -574,51 +574,51 @@ For example, the following in a markdown file: >markdown :FnlCompileBuffer - + : Compiles current active fennel buffer - + :FnlCompile[!] - + : Diff compiles all indexed fennel files If bang! is present then forcefully compiles all `source` files - + :Fnl {expr} - + : Executes and Evalutate {expr} of fennel - + ```fennel :Fnl (print "Hello World") - + :Fnl (values some_var) ``` - + Testing < becomes the following vimdoc: > - + *projectName-:FnlCompileBuffer* - - + + :FnlCompileBuffer Compiles current active fennel buffer - - + + *projectName-:FnlCompile* - - + + :FnlCompile[!] Diff compiles all indexed fennel files If bang! is present then forcefully compiles all `source` files - - + + *projectName-:Fnl* - - + + :Fnl {expr} Executes and Evalutate {expr} of fennel >fennel :Fnl (print "Hello World") - + :Fnl (values some_var) < Testing @@ -734,15 +734,15 @@ inside `panvimdoc-ignore-{start/end}` blocks: > - +
Vimdoc Ignored Section - + This section will ignored when generating the vimdoc file. This will only show up in the Markdown file. - +
- + < @@ -767,9 +767,9 @@ because it may cause the rest of your document to be ignored. Do this instead: > - + ![screenshot](./gif.gif) - + < @@ -785,23 +785,23 @@ As with markdown only content, you must include a blank link before and after the comment. >markdown - + - + < From 236cec6d293082fe05f0466ed62b834be34864d8 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:36:25 -0400 Subject: [PATCH 08/16] docs: update NVIM version in panvimdoc.txt header --- doc/panvimdoc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/panvimdoc.txt b/doc/panvimdoc.txt index fa9519a..8e3e81a 100644 --- a/doc/panvimdoc.txt +++ b/doc/panvimdoc.txt @@ -1,5 +1,5 @@ *panvimdoc.txt* Convert Markdown docs to Vimdoc - For NVIM v0.8.0 Last change: 2026 April 12 + For NVIM v0.11.6 Last change: 2026 April 12 ============================================================================== Table of Contents *panvimdoc-table-of-contents* From 6b328362610024ca271513e52a60e75537151f81 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:36:25 -0400 Subject: [PATCH 09/16] chore(mise): add prek plugin and update panvimdoc build task --- .config/mise.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/mise.toml b/.config/mise.toml index 167528e..6417c4b 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -6,11 +6,12 @@ status.show_env = true uv = "latest" "github:jgm/pandoc" = "latest" "github:neovim/neovim" = "latest" +"github:j178/prek" = "latest" [tasks."panvimdoc:build"] description = "Build doc/panvimdoc.txt from doc/panvimdoc.md" run = """ -./panvimdoc.sh --project-name panvimdoc --input-file doc/panvimdoc.md --vim-version 'NVIM v0.8.0' --toc true --description 'Convert Markdown docs to Vimdoc' --title-date-pattern '%Y %B %d' --dedup-subheadings true --demojify false --treesitter true --ignore-rawblocks true --doc-mapping false --doc-mapping-project-name true --shift-heading-level-by 0 --increment-heading-level-by 0 +./panvimdoc.sh --project-name panvimdoc --input-file doc/panvimdoc.md --toc true --description 'Convert Markdown docs to Vimdoc' --title-date-pattern '%Y %B %d' --dedup-subheadings true --demojify false --treesitter true --ignore-rawblocks true --doc-mapping false --doc-mapping-project-name true --shift-heading-level-by 0 --increment-heading-level-by 0 """ [tasks."panvimdoc:docs"] From 536c9007f8d4753e9e45d1529af45df00bff7505 Mon Sep 17 00:00:00 2001 From: kdheepak Date: Sun, 12 Apr 2026 11:36:40 +0000 Subject: [PATCH 10/16] Auto generate docs --- .config/mise.lock | 46 ++++++++++++++++++++++++++++++++++++++++++++++ doc/panvimdoc.txt | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.config/mise.lock b/.config/mise.lock index 6a3f983..df03ab5 100644 --- a/.config/mise.lock +++ b/.config/mise.lock @@ -1,5 +1,51 @@ # @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html +[[tools."github:j178/prek"]] +version = "0.3.8" +backend = "github:j178/prek" + +[tools."github:j178/prek"."platforms.linux-arm64"] +checksum = "sha256:e2119993923e9bdc28aca11f89361197f8c70648cb016bb6103379445e21758a" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592135" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.linux-arm64-musl"] +checksum = "sha256:b88d96aef4ea84999d12958c390611d3a26194ee57225fe2ff15a9855e3a71bf" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592137" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.linux-x64"] +checksum = "sha256:80ec6adb9f1883344de52cb943d371ecfd25340c4a6b5b81e2600d27e246cfa1" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592172" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.linux-x64-musl"] +checksum = "sha256:732cfb03960e6dfd5df2cb67906797aa8831750ef3a6f6340ec2b90ee8b7a59f" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592174" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.macos-arm64"] +checksum = "sha256:702fde4399fafb054ce85d0a64367689e3668b6475d732c4a46aae50cec0a4be" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592130" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.macos-x64"] +checksum = "sha256:010198daf4e99a76d03a911973320542ffd7a04091cf7e86c60ac861187577f6" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592166" +provenance = "github-attestations" + +[tools."github:j178/prek"."platforms.windows-x64"] +checksum = "sha256:1da2735c31548dacd2751f90c15b5f643aa72f3053f366636f95153ee2c7186e" +url = "https://github.com/j178/prek/releases/download/v0.3.8/prek-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/379592169" +provenance = "github-attestations" + [[tools."github:jgm/pandoc"]] version = "3.9.0.2" backend = "github:jgm/pandoc" diff --git a/doc/panvimdoc.txt b/doc/panvimdoc.txt index 8e3e81a..1bfb191 100644 --- a/doc/panvimdoc.txt +++ b/doc/panvimdoc.txt @@ -1,5 +1,5 @@ *panvimdoc.txt* Convert Markdown docs to Vimdoc - For NVIM v0.11.6 Last change: 2026 April 12 + For NVIM v0.12.1 Last change: 2026 April 12 ============================================================================== Table of Contents *panvimdoc-table-of-contents* From 8d1e278cdb78d35d05aa8e8574ee1a3aa8299cc4 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:58:31 -0400 Subject: [PATCH 11/16] feat(tasks): add prek validation and smoke test for pre-commit hook --- .config/mise.lock | 60 +++++++++++++++++++++++------------------------ .config/mise.toml | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 30 deletions(-) diff --git a/.config/mise.lock b/.config/mise.lock index df03ab5..4e08778 100644 --- a/.config/mise.lock +++ b/.config/mise.lock @@ -86,79 +86,79 @@ url = "https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-wi url_api = "https://api.github.com/repos/jgm/pandoc/releases/assets/377166311" [[tools."github:neovim/neovim"]] -version = "stable" +version = "0.12.1" backend = "github:neovim/neovim" [tools."github:neovim/neovim"."platforms.linux-arm64"] checksum = "sha256:a3f8aa5590fd2ac930bcc5c9070b9ac1ec33461d262b6428874c5fc640f3f13c" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-arm64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065328" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065382" [tools."github:neovim/neovim"."platforms.linux-arm64-musl"] checksum = "sha256:a3f8aa5590fd2ac930bcc5c9070b9ac1ec33461d262b6428874c5fc640f3f13c" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-arm64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065328" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065382" [tools."github:neovim/neovim"."platforms.linux-x64"] checksum = "sha256:ab757a1fd9ad307d53d2df4045698906a7ca3993d92260dd8fe49108712d57d0" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065329" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-linux-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065380" [tools."github:neovim/neovim"."platforms.linux-x64-musl"] checksum = "sha256:ab757a1fd9ad307d53d2df4045698906a7ca3993d92260dd8fe49108712d57d0" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065329" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-linux-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065380" [tools."github:neovim/neovim"."platforms.macos-arm64"] checksum = "sha256:b77e01c5421ac1bac593eed5c2ea1b950439306dd4c32371ac2473792da9a9d5" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-macos-arm64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065331" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-macos-arm64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065384" [tools."github:neovim/neovim"."platforms.macos-x64"] checksum = "sha256:e59a5eafcdf824e2bf6a738e75f8f62ba4ff1b7f1c7daaec2d134aa46737907c" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-macos-x86_64.tar.gz" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065327" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-macos-x86_64.tar.gz" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065381" [tools."github:neovim/neovim"."platforms.windows-x64"] checksum = "sha256:75fedc530b3772ca9f177edc7db92560bb9d2d6700ac6d5b2c53eaf5a9317ae3" -url = "https://github.com/neovim/neovim/releases/download/stable/nvim-win64.zip" -url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065345" +url = "https://github.com/neovim/neovim/releases/download/v0.12.1/nvim-win64.zip" +url_api = "https://api.github.com/repos/neovim/neovim/releases/assets/390065400" [[tools.uv]] -version = "0.11.2" +version = "0.11.6" backend = "aqua:astral-sh/uv" [tools.uv."platforms.linux-arm64"] -checksum = "sha256:275d91dd1f1955136591e7ec5e1fa21e84d0d37ead7da7c35c3683df748d9855" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-unknown-linux-musl.tar.gz" +checksum = "sha256:d14ebd6f200047264152daaf97b8bd36c7885a5033e9e8bba8366cb0049c0d00" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-aarch64-unknown-linux-musl.tar.gz" provenance = "github-attestations" [tools.uv."platforms.linux-arm64-musl"] -checksum = "sha256:275d91dd1f1955136591e7ec5e1fa21e84d0d37ead7da7c35c3683df748d9855" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-unknown-linux-musl.tar.gz" +checksum = "sha256:d14ebd6f200047264152daaf97b8bd36c7885a5033e9e8bba8366cb0049c0d00" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-aarch64-unknown-linux-musl.tar.gz" provenance = "github-attestations" [tools.uv."platforms.linux-x64"] -checksum = "sha256:4700d9fc75734247587deb3e25dd2c6c24f4ac69e8fe91d6acad4a6013115c06" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-unknown-linux-musl.tar.gz" +checksum = "sha256:aa342a53abe42364093506d7704214d2cdca30b916843e520bc67759a5d20132" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-x86_64-unknown-linux-musl.tar.gz" provenance = "github-attestations" [tools.uv."platforms.linux-x64-musl"] -checksum = "sha256:4700d9fc75734247587deb3e25dd2c6c24f4ac69e8fe91d6acad4a6013115c06" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-unknown-linux-musl.tar.gz" +checksum = "sha256:aa342a53abe42364093506d7704214d2cdca30b916843e520bc67759a5d20132" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-x86_64-unknown-linux-musl.tar.gz" provenance = "github-attestations" [tools.uv."platforms.macos-arm64"] -checksum = "sha256:4beaa9550f93ef7f0fc02f7c28c9c48cd61fe30db00f5ac8947e0a425c3fb282" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-aarch64-apple-darwin.tar.gz" +checksum = "sha256:4b69a4e366ec38cd5f305707de95e12951181c448679a00dce2a78868dfc9f5b" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-aarch64-apple-darwin.tar.gz" provenance = "github-attestations" [tools.uv."platforms.macos-x64"] -checksum = "sha256:a9c3653245031304c50dd60ac0301bf6c112e12c38c32302a71d4fa6a63ba2cb" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-apple-darwin.tar.gz" +checksum = "sha256:8e0ed5035eaa28c7c8cd2a46b5b9a05bfff1ef01dbdc090a010eb8fdf193a457" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-x86_64-apple-darwin.tar.gz" provenance = "github-attestations" [tools.uv."platforms.windows-x64"] -checksum = "sha256:171b7ccda1bbd562da6babeffcf533a1c6cc7862cf998da826e1db534fc43e48" -url = "https://github.com/astral-sh/uv/releases/download/0.11.2/uv-x86_64-pc-windows-msvc.zip" +checksum = "sha256:99aa60edd017a256dbf378f372d1cff3292dbc6696e0ea01716d9158d773ab77" +url = "https://github.com/astral-sh/uv/releases/download/0.11.6/uv-x86_64-pc-windows-msvc.zip" provenance = "github-attestations" diff --git a/.config/mise.toml b/.config/mise.toml index 6417c4b..2813e5e 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -23,3 +23,49 @@ pandoc --katex --from markdown+tex_math_single_backslash --to html5+smart --temp [tasks."panvimdoc:test"] description = "Run the pytest suite" run = "uv run pytest -q" + +[tasks."panvimdoc:test-prek"] +description = "Validate the hook manifest and smoke-test the pre-commit hook with prek" +run = """ +mkdir -p /tmp/prek-home +PREK_HOME=/tmp/prek-home prek validate-manifest .pre-commit-hooks.yaml +REPO_ROOT="$PWD" +TMPDIR="$(mktemp -d)" +cleanup() { + rm -rf "$TMPDIR" +} +trap cleanup EXIT +git -C "$TMPDIR" init -q +mkdir -p "$TMPDIR/doc" +printf '# sample\n' > "$TMPDIR/README.md" +git -C "$TMPDIR" add README.md +cat > "$TMPDIR/.pre-commit-config.yaml" </dev/null +) +PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$TMPDIR/.pre-commit-config.yaml" --all-files -C "$TMPDIR" +printf '\nMore text\n' >> "$TMPDIR/README.md" +if PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$TMPDIR/.pre-commit-config.yaml" --all-files -C "$TMPDIR"; then + echo "expected prek to fail when generated documentation is stale" + exit 1 +fi +rg -q 'More text' "$TMPDIR/doc/sample.txt" +""" From 38ca6eb7093569f7ff50fc62d8b1ee5fefb62655 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:05:18 -0400 Subject: [PATCH 12/16] refactor(tasks): move task commands to scripts and update mise config --- .config/mise.toml | 58 +++++------------------------------ scripts/tasks/build.sh | 23 ++++++++++++++ scripts/tasks/docs.sh | 24 +++++++++++++++ scripts/tasks/test-action.sh | 41 +++++++++++++++++++++++++ scripts/tasks/test-prek.sh | 59 ++++++++++++++++++++++++++++++++++++ scripts/tasks/test.sh | 10 ++++++ 6 files changed, 165 insertions(+), 50 deletions(-) create mode 100755 scripts/tasks/build.sh create mode 100755 scripts/tasks/docs.sh create mode 100755 scripts/tasks/test-action.sh create mode 100755 scripts/tasks/test-prek.sh create mode 100755 scripts/tasks/test.sh diff --git a/.config/mise.toml b/.config/mise.toml index 2813e5e..964a905 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -10,62 +10,20 @@ uv = "latest" [tasks."panvimdoc:build"] description = "Build doc/panvimdoc.txt from doc/panvimdoc.md" -run = """ -./panvimdoc.sh --project-name panvimdoc --input-file doc/panvimdoc.md --toc true --description 'Convert Markdown docs to Vimdoc' --title-date-pattern '%Y %B %d' --dedup-subheadings true --demojify false --treesitter true --ignore-rawblocks true --doc-mapping false --doc-mapping-project-name true --shift-heading-level-by 0 --increment-heading-level-by 0 -""" +run = "./scripts/tasks/build.sh" [tasks."panvimdoc:docs"] description = "Build the static docs site" -run = """ -pandoc --katex --from markdown+tex_math_single_backslash --to html5+smart --template=./scripts/template.html5 --css=/panvimdoc/css/theme.css --css=/panvimdoc/css/skylighting-solarized-theme.css --toc --wrap=none --metadata title=panvimdoc doc/panvimdoc.md --lua-filter=scripts/include-files.lua --lua-filter=scripts/skip-blocks.lua -t html -o public/index.html -""" +run = "./scripts/tasks/docs.sh" [tasks."panvimdoc:test"] description = "Run the pytest suite" -run = "uv run pytest -q" +run = "./scripts/tasks/test.sh" + +[tasks."panvimdoc:test-action"] +description = "Build the Docker action and smoke-test it in an isolated workspace" +run = "./scripts/tasks/test-action.sh" [tasks."panvimdoc:test-prek"] description = "Validate the hook manifest and smoke-test the pre-commit hook with prek" -run = """ -mkdir -p /tmp/prek-home -PREK_HOME=/tmp/prek-home prek validate-manifest .pre-commit-hooks.yaml -REPO_ROOT="$PWD" -TMPDIR="$(mktemp -d)" -cleanup() { - rm -rf "$TMPDIR" -} -trap cleanup EXIT -git -C "$TMPDIR" init -q -mkdir -p "$TMPDIR/doc" -printf '# sample\n' > "$TMPDIR/README.md" -git -C "$TMPDIR" add README.md -cat > "$TMPDIR/.pre-commit-config.yaml" </dev/null -) -PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$TMPDIR/.pre-commit-config.yaml" --all-files -C "$TMPDIR" -printf '\nMore text\n' >> "$TMPDIR/README.md" -if PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$TMPDIR/.pre-commit-config.yaml" --all-files -C "$TMPDIR"; then - echo "expected prek to fail when generated documentation is stale" - exit 1 -fi -rg -q 'More text' "$TMPDIR/doc/sample.txt" -""" +run = "./scripts/tasks/test-prek.sh" diff --git a/scripts/tasks/build.sh b/scripts/tasks/build.sh new file mode 100755 index 0000000..c5d773d --- /dev/null +++ b/scripts/tasks/build.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)" + +cd "$REPO_ROOT" + +./panvimdoc.sh \ + --project-name panvimdoc \ + --input-file doc/panvimdoc.md \ + --toc true \ + --description 'Convert Markdown docs to Vimdoc' \ + --title-date-pattern '%Y %B %d' \ + --dedup-subheadings true \ + --demojify false \ + --treesitter true \ + --ignore-rawblocks true \ + --doc-mapping false \ + --doc-mapping-project-name true \ + --shift-heading-level-by 0 \ + --increment-heading-level-by 0 diff --git a/scripts/tasks/docs.sh b/scripts/tasks/docs.sh new file mode 100755 index 0000000..7f75405 --- /dev/null +++ b/scripts/tasks/docs.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)" + +cd "$REPO_ROOT" + +pandoc \ + --katex \ + --from markdown+tex_math_single_backslash \ + --to html5+smart \ + --template=./scripts/template.html5 \ + --css=/panvimdoc/css/theme.css \ + --css=/panvimdoc/css/skylighting-solarized-theme.css \ + --toc \ + --wrap=none \ + --metadata title=panvimdoc \ + doc/panvimdoc.md \ + --lua-filter=scripts/include-files.lua \ + --lua-filter=scripts/skip-blocks.lua \ + -t html \ + -o public/index.html diff --git a/scripts/tasks/test-action.sh b/scripts/tasks/test-action.sh new file mode 100755 index 0000000..e9517c0 --- /dev/null +++ b/scripts/tasks/test-action.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)" + +cd "$REPO_ROOT" + +tmpdir="$(mktemp -d)" +image_tag="panvimdoc-action-test-$$" + +cleanup() { + rm -rf "$tmpdir" + docker image rm -f "$image_tag" >/dev/null 2>&1 || true +} + +trap cleanup EXIT + +mkdir -p "$tmpdir/doc" +cp tests/fixtures/action/input.md "$tmpdir/input.md" +cp tests/fixtures/action/expected.txt "$tmpdir/expected.txt" + +docker build -t "$image_tag" "$REPO_ROOT" +docker run --rm -v "$tmpdir:/github/workspace" "$image_tag" \ + --project-name action-smoke \ + --input-file input.md \ + --vim-version 'NVIM v0.8.0' \ + --toc true \ + --description 'Action Test' \ + --title-date-pattern 'ACTION TEST DATE' \ + --dedup-subheadings false \ + --demojify false \ + --treesitter true \ + --ignore-rawblocks true \ + --doc-mapping true \ + --doc-mapping-project-name true \ + --shift-heading-level-by 0 \ + --increment-heading-level-by 0 + +diff -u "$tmpdir/expected.txt" "$tmpdir/doc/action-smoke.txt" diff --git a/scripts/tasks/test-prek.sh b/scripts/tasks/test-prek.sh new file mode 100755 index 0000000..558befa --- /dev/null +++ b/scripts/tasks/test-prek.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)" + +cd "$REPO_ROOT" + +mkdir -p /tmp/prek-home +PREK_HOME=/tmp/prek-home prek validate-manifest .pre-commit-hooks.yaml + +tmpdir="$(mktemp -d)" + +cleanup() { + rm -rf "$tmpdir" +} + +trap cleanup EXIT + +git -C "$tmpdir" init -q +mkdir -p "$tmpdir/doc" +printf '# sample\n' > "$tmpdir/README.md" +git -C "$tmpdir" add README.md + +cat > "$tmpdir/.pre-commit-config.yaml" </dev/null +) + +PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$tmpdir/.pre-commit-config.yaml" --all-files -C "$tmpdir" + +printf '\nMore text\n' >> "$tmpdir/README.md" + +if PREK_HOME=/tmp/prek-home PREK_COLOR=never prek run --config "$tmpdir/.pre-commit-config.yaml" --all-files -C "$tmpdir"; then + echo "expected prek to fail when generated documentation is stale" + exit 1 +fi + +rg -q 'More text' "$tmpdir/doc/sample.txt" diff --git a/scripts/tasks/test.sh b/scripts/tasks/test.sh new file mode 100755 index 0000000..93ebc28 --- /dev/null +++ b/scripts/tasks/test.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)" + +cd "$REPO_ROOT" + +uv run pytest -q From 7fea721cff3df85b282bc637073c4aee94a66e81 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:05:19 -0400 Subject: [PATCH 13/16] test(fixtures): add action test input and expected output files --- tests/fixtures/action/expected.txt | 18 ++++++++++++++++++ tests/fixtures/action/input.md | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 tests/fixtures/action/expected.txt create mode 100644 tests/fixtures/action/input.md diff --git a/tests/fixtures/action/expected.txt b/tests/fixtures/action/expected.txt new file mode 100644 index 0000000..2e015a4 --- /dev/null +++ b/tests/fixtures/action/expected.txt @@ -0,0 +1,18 @@ +*action-smoke.txt* Action Test + For NVIM v0.8.0 Last change: ACTION TEST DATE + +============================================================================== +Table of Contents *action-smoke-table-of-contents* + +1. panvimdoc |action-smoke-panvimdoc| + - Usage |action-smoke-usage| + +============================================================================== +1. panvimdoc *action-smoke-panvimdoc* + + +USAGE *action-smoke-usage* + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/tests/fixtures/action/input.md b/tests/fixtures/action/input.md new file mode 100644 index 0000000..a49a897 --- /dev/null +++ b/tests/fixtures/action/input.md @@ -0,0 +1,3 @@ +# panvimdoc + +## Usage From 3431cd88b0e5060aad946bb575424dbc96548245 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:05:23 -0400 Subject: [PATCH 14/16] chore(workflows): update actions and add smoke test jobs to CI configs --- .github/workflows/docs.yml | 4 ++-- .github/workflows/panvimdoc.yml | 6 +++--- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7503206..34552ae 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Set up mise - uses: jdx/mise-action@v3 + uses: jdx/mise-action@v4 with: install: true cache: true diff --git a/.github/workflows/panvimdoc.yml b/.github/workflows/panvimdoc.yml index 7a431ba..0be35df 100644 --- a/.github/workflows/panvimdoc.yml +++ b/.github/workflows/panvimdoc.yml @@ -7,14 +7,14 @@ jobs: runs-on: ubuntu-latest name: pandoc to vimdoc steps: - - uses: actions/checkout@v4 - - uses: jdx/mise-action@v3 + - uses: actions/checkout@v6 + - uses: jdx/mise-action@v4 with: install: true cache: true - name: Build vimdoc run: mise tasks run panvimdoc:build - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: "Auto generate docs" branch: ${{ github.head_ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89e8da2..d41ceff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,11 +9,37 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up mise - uses: jdx/mise-action@v3 + uses: jdx/mise-action@v4 with: install: true cache: true - name: Run tests run: mise tasks run panvimdoc:test + + action-smoke: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Set up mise + uses: jdx/mise-action@v4 + with: + install: true + cache: true + - name: Run action smoke test + run: mise tasks run panvimdoc:test-action + + pre-commit-smoke: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Set up mise + uses: jdx/mise-action@v4 + with: + install: true + cache: true + - name: Run prek smoke test + run: mise tasks run panvimdoc:test-prek From 0bf0c7c3fd7d7f93210801f5ac423fd3bfee7157 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:08:52 -0400 Subject: [PATCH 15/16] feat(mise): add ripgrep tool config --- .config/mise.lock | 39 +++++++++++++++++++++++++++++++++++++++ .config/mise.toml | 1 + 2 files changed, 40 insertions(+) diff --git a/.config/mise.lock b/.config/mise.lock index 4e08778..01ac071 100644 --- a/.config/mise.lock +++ b/.config/mise.lock @@ -1,5 +1,44 @@ # @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html +[[tools."github:BurntSushi/ripgrep"]] +version = "15.1.0" +backend = "github:BurntSushi/ripgrep" + +[tools."github:BurntSushi/ripgrep"."platforms.linux-arm64"] +checksum = "sha256:2b661c6ef508e902f388e9098d9c4c5aca72c87b55922d94abdba830b4dc885e" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307306472" + +[tools."github:BurntSushi/ripgrep"."platforms.linux-arm64-musl"] +checksum = "sha256:2b661c6ef508e902f388e9098d9c4c5aca72c87b55922d94abdba830b4dc885e" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307306472" + +[tools."github:BurntSushi/ripgrep"."platforms.linux-x64"] +checksum = "sha256:1c9297be4a084eea7ecaedf93eb03d058d6faae29bbc57ecdaf5063921491599" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307306614" + +[tools."github:BurntSushi/ripgrep"."platforms.linux-x64-musl"] +checksum = "sha256:1c9297be4a084eea7ecaedf93eb03d058d6faae29bbc57ecdaf5063921491599" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307306614" + +[tools."github:BurntSushi/ripgrep"."platforms.macos-arm64"] +checksum = "sha256:378e973289176ca0c6054054ee7f631a065874a352bf43f0fa60ef079b6ba715" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307305438" + +[tools."github:BurntSushi/ripgrep"."platforms.macos-x64"] +checksum = "sha256:64811cb24e77cac3057d6c40b63ac9becf9082eedd54ca411b475b755d334882" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307305422" + +[tools."github:BurntSushi/ripgrep"."platforms.windows-x64"] +checksum = "sha256:124510b94b6baa3380d051fdf4650eaa80a302c876d611e9dba0b2e18d87493a" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep-15.1.0-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/307305871" + [[tools."github:j178/prek"]] version = "0.3.8" backend = "github:j178/prek" diff --git a/.config/mise.toml b/.config/mise.toml index 964a905..51bdd4d 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -7,6 +7,7 @@ uv = "latest" "github:jgm/pandoc" = "latest" "github:neovim/neovim" = "latest" "github:j178/prek" = "latest" +"github:BurntSushi/ripgrep" = "latest" [tasks."panvimdoc:build"] description = "Build doc/panvimdoc.txt from doc/panvimdoc.md" From 3b4ded9156feebfb26f7465332718ce7ea91f4fe Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:08:53 -0400 Subject: [PATCH 16/16] fix(test-action): set working dir in docker run command --- scripts/tasks/test-action.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tasks/test-action.sh b/scripts/tasks/test-action.sh index e9517c0..14850f1 100755 --- a/scripts/tasks/test-action.sh +++ b/scripts/tasks/test-action.sh @@ -22,7 +22,7 @@ cp tests/fixtures/action/input.md "$tmpdir/input.md" cp tests/fixtures/action/expected.txt "$tmpdir/expected.txt" docker build -t "$image_tag" "$REPO_ROOT" -docker run --rm -v "$tmpdir:/github/workspace" "$image_tag" \ +docker run --rm -w /github/workspace -v "$tmpdir:/github/workspace" "$image_tag" \ --project-name action-smoke \ --input-file input.md \ --vim-version 'NVIM v0.8.0' \