Skip to content

Conversation

@MeanderingProgrammer
Copy link
Contributor

Problem

The details for description are:

Project description used in title (if empty, uses neovim version and current date)

However this currently does not work, instead the version section of the description is left empty.

Solution

The reason this occurs is vimversion is set to empty by default:

"--metadata=vimversion:${VIM_VERSION:-""}"

However the check compares the value to nil.

Added a helper empty function that checks if the value is nil or if the length is 0. Used when checking vim_version & project_description.

Testing

Ran on my plugin's README:

panvimdoc.sh \
  --project-name render-markdown \
  --input-file README.md

Description Before:

*render-markdown.txt*              For              Last change: 2025 April 28

Description After:

*render-markdown.txt*        For NVIM v0.11.1       Last change: 2025 April 28

## Problem

The details for description are:

```text
Project description used in title (if empty, uses neovim version and current date)
```

However this currently does not work, instead the version section of the
description is left empty.

## Solution

The reason this occurs is `vimversion` is set to empty by default:

```bash
"--metadata=vimversion:${VIM_VERSION:-""}"
```

However the check compares the value to `nil`.

Added a helper `empty` function that checks if the value is `nil` or if
the length is 0. Used when checking `vim_version` & `project_description`.
@kdheepak kdheepak merged commit 04a0ed3 into kdheepak:main Apr 29, 2025
1 check passed
@kdheepak
Copy link
Owner

Thank you for the PR!

@MeanderingProgrammer MeanderingProgrammer deleted the fix-default-version branch April 29, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants