Skip to content

Commit 1636954

Browse files
committedJan 4, 2025··
chore(release): 7.8.0
## Details Also includes small update to completions to resolve to parent node (list_item or block_quote) and only provide callout completions at start of block quote.
1 parent 1faa656 commit 1636954

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed
 

Diff for: ‎CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Pre-release
44

5+
## 7.8.0 (2025-01-04)
6+
57
### Features
68

79
- individual components can all specify render modes [#269](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/269)

Diff for: ‎doc/render-markdown.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*render-markdown.txt* For 0.10.0 Last change: 2025 January 03
1+
*render-markdown.txt* For 0.10.0 Last change: 2025 January 04
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*

Diff for: ‎lua/render-markdown/health.lua

+1-1
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 = '7.7.11'
8+
M.version = '7.8.0'
99

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

Diff for: ‎lua/render-markdown/integ/source.lua

+15-4
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,24 @@ function M.items(buf, row, col)
3131
return nil
3232
end
3333

34+
local children = { 'block_quote_marker', 'block_continuation' }
35+
if vim.tbl_contains(children, node:type()) or list_markers[node:type()] ~= nil then
36+
node = node:parent()
37+
if node == nil then
38+
return nil
39+
end
40+
end
41+
3442
local items = {}
3543
local config = state.get(buf)
36-
if vim.tbl_contains({ 'block_quote', 'block_quote_marker' }, node:type()) then
37-
for _, component in pairs(config.callout) do
38-
table.insert(items, M.item(component.raw, component.rendered, nil))
44+
if node:type() == 'block_quote' then
45+
local quote_row = node:range()
46+
if quote_row == row then
47+
for _, component in pairs(config.callout) do
48+
table.insert(items, M.item(component.raw, component.rendered, nil))
49+
end
3950
end
40-
elseif node:type() == 'list_item' or list_markers[node:type()] ~= nil then
51+
elseif node:type() == 'list_item' then
4152
local checkbox = config.checkbox
4253
local prefix = M.list_prefix(row, node)
4354
table.insert(items, M.item(prefix .. '[ ] ', checkbox.unchecked.icon, 'unchecked'))

0 commit comments

Comments
 (0)
Please sign in to comment.