Skip to content

Commit 7b37aab

Browse files
fix: prioritize hide over highlight_border
## Details Previously if the following options were set: - `code.border = 'hide'` - `code.highlight_border = false` We would skip concealing the border line and leave it as is. The only `border` values that need to be gated based on `highlight_border` being `false` are `thick` and `thin`, since a highlight is needed to create the virtual text. To fix this swap the order values are checked.
1 parent d7be79b commit 7b37aab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/render-markdown/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local state = require('render-markdown.state')
55
local M = {}
66

77
---@private
8-
M.version = '8.7.2'
8+
M.version = '8.7.3'
99

1010
function M.check()
1111
M.start('versions')

lua/render-markdown/render/markdown/code.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ end
176176
function Render:border(node, thin)
177177
local kind = self.config.border
178178
local highlight = self.config.highlight_border
179-
if kind == 'none' or not node or not highlight then
180-
-- do nothing
181-
elseif kind == 'hide' then
179+
if kind == 'hide' then
182180
self.marks:over(true, node, { conceal_lines = '' })
181+
elseif kind == 'none' or not node or not highlight then
182+
-- do nothing
183183
else
184184
local icon = kind == 'thin' and thin or ' '
185185
if icon ~= ' ' then

0 commit comments

Comments
 (0)