Skip to content

Commit 33673e6

Browse files
feat: add a default icon for indent feature
## Details This is a quick follow up to add a default icon to the indent feature: 21623a9 I think this feature makes sense to push out to users and have them opt-out rather than discovering it. To opt-out set the `icon` value to the empty string: ```lua require('render-markdown').setup({ indent = { enabled = true, icon = '', }, }) ```
1 parent 4d754be commit 33673e6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ require('render-markdown').setup({
681681
-- Do not indent heading titles, only the body
682682
skip_heading = false,
683683
-- Prefix added when indenting, one per level
684-
icon = '',
684+
icon = '',
685685
-- Applied to icon
686686
highlight = 'RenderMarkdownIndent',
687687
},
@@ -1341,7 +1341,7 @@ require('render-markdown').setup({
13411341
-- Do not indent heading titles, only the body
13421342
skip_heading = false,
13431343
-- Prefix added when indenting, one per level
1344-
icon = '',
1344+
icon = '',
13451345
-- Applied to icon
13461346
highlight = 'RenderMarkdownIndent',
13471347
},

doc/render-markdown.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ Default Configuration ~
742742
-- Do not indent heading titles, only the body
743743
skip_heading = false,
744744
-- Prefix added when indenting, one per level
745-
icon = '',
745+
icon = '',
746746
-- Applied to icon
747747
highlight = 'RenderMarkdownIndent',
748748
},
@@ -1378,7 +1378,7 @@ Indent Configuration ~
13781378
-- Do not indent heading titles, only the body
13791379
skip_heading = false,
13801380
-- Prefix added when indenting, one per level
1381-
icon = '',
1381+
icon = '',
13821382
-- Applied to icon
13831383
highlight = 'RenderMarkdownIndent',
13841384
},

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 = '8.0.9'
8+
M.version = '8.0.10'
99

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

lua/render-markdown/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ M.default_config = {
817817
-- Do not indent heading titles, only the body
818818
skip_heading = false,
819819
-- Prefix added when indenting, one per level
820-
icon = '',
820+
icon = '',
821821
-- Applied to icon
822822
highlight = 'RenderMarkdownIndent',
823823
},

tests/indent_spec.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ local function indent_mark(mark, lengths)
7070
end
7171

7272
describe('indent.md', function()
73-
it('with heading border', function()
73+
it('with heading border & no icon', function()
7474
util.setup('tests/data/indent.md', {
7575
heading = { border = true },
76-
indent = { enabled = true },
76+
indent = { enabled = true, icon = '' },
7777
})
7878

7979
local expected, row = {}, util.row()
@@ -131,9 +131,9 @@ describe('indent.md', function()
131131
})
132132
end)
133133

134-
it('with per_level, skip_level & icon', function()
134+
it('with per_level & skip_level', function()
135135
util.setup('tests/data/indent.md', {
136-
indent = { enabled = true, per_level = 4, skip_level = 0, icon = '' },
136+
indent = { enabled = true, per_level = 4, skip_level = 0 },
137137
})
138138

139139
local expected, row = {}, util.row()

0 commit comments

Comments
 (0)