Skip to content

Commit 4b80b4f

Browse files
feat: min_width code block property
## Details Adds `code -> min_width` which can be used to set a minimim width for block width code blocks. This functions in addition to right padding. Makes it easy to create uniform width code block sections. Other changes are a change to the handler add methods to flatten the type structure of marks and shorten things a bit.
1 parent 5f9c00e commit 4b80b4f

File tree

9 files changed

+164
-271
lines changed

9 files changed

+164
-271
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ require('render-markdown').setup({
263263
left_pad = 0,
264264
-- Amount of padding to add to the right of code blocks when width is 'block'
265265
right_pad = 0,
266+
-- Minimum width to use for code blocks when width is 'block'
267+
min_width = 0,
266268
-- Width of the code block background:
267269
-- block: width of the code block
268270
-- full: full width of the window
@@ -547,6 +549,8 @@ require('render-markdown').setup({
547549
left_pad = 0,
548550
-- Amount of padding to add to the right of code blocks when width is 'block'
549551
right_pad = 0,
552+
-- Minimum width to use for code blocks when width is 'block'
553+
min_width = 0,
550554
-- Width of the code block background:
551555
-- block: width of the code block
552556
-- full: full width of the window

doc/render-markdown.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ Full Default Configuration ~
295295
left_pad = 0,
296296
-- Amount of padding to add to the right of code blocks when width is 'block'
297297
right_pad = 0,
298+
-- Minimum width to use for code blocks when width is 'block'
299+
min_width = 0,
298300
-- Width of the code block background:
299301
-- block: width of the code block
300302
-- full: full width of the window
@@ -579,6 +581,8 @@ CODE BLOCKS *render-markdown-setup-code-blocks*
579581
left_pad = 0,
580582
-- Amount of padding to add to the right of code blocks when width is 'block'
581583
right_pad = 0,
584+
-- Minimum width to use for code blocks when width is 'block'
585+
min_width = 0,
582586
-- Width of the code block background:
583587
-- block: width of the code block
584588
-- full: full width of the window

0 commit comments

Comments
 (0)