Skip to content

bug: bullet right pad conflicts with heading border #297

@b0o

Description

@b0o

Neovim version (nvim -v)

v0.11.0-dev-1545+ga4f575abd8

Neovim distribution

N/a

Operating system

Arch Linux

Terminal emulator / GUI

Ghostty

Describe the bug

When bullet.right_pad >= 1 and heading.border == true, if an ordered/unordered list appears directly before a heading, the first line of the heading border is offset to the right by the right_pad amount.

Here is an example:

2025-01-13_23-26-14_region

Note the gap at the beginning of lines 13 and 21.

Markdown from screenshot

# Hello

Hey!

## Stuff

Stuff is cool:

1. Plants
2. Animals
3. Rocks
4. Etc.

### Plants

Plants are cool:

- Trees
- Flowers
- Grass

### Animals

Animals are cool:

- Dogs
- Cows
- Frogs

Expected behavior

The heading border should start at the beginning of the line, regardless of the bullet.right_pad setting. It should look like this:

2025-01-13_23-27-54_region

Healthcheck output

render-markdown:                     require("render-markdown.health").check()

render-markdown.nvim [version] ~
- OK plugin 7.8.6
- OK neovim >= 0.10

render-markdown.nvim [configuration] ~
- OK valid

render-markdown.nvim [nvim-treesitter] ~
- OK installed
- OK markdown: parser installed
- OK markdown: highlight enabled
- OK markdown_inline: parser installed
- OK markdown_inline: highlight enabled
- WARNING latex: parser not installed
  - ADVICE:
    - Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

render-markdown.nvim [icons] ~
- OK using: nvim-web-devicons

render-markdown.nvim [executables] ~
- WARNING latex2text: not installed
  - ADVICE:
    - Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

render-markdown.nvim [conflicts] ~
- OK headlines: not installed
- OK obsidian: installed but should not conflict

Plugin configuration

{
  bullet = {
    right_pad = 1,
  },
  heading = {
    border = true,
  },
}

Plugin error log

N/a

Confirmations

  • I have updated this plugin to the latest version using my plugin manager
  • I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions