diff --git a/rc/base/markdown.kak b/rc/base/markdown.kak index 3eaa77a3..8d50cad8 100644 --- a/rc/base/markdown.kak +++ b/rc/base/markdown.kak @@ -127,7 +127,7 @@ add-highlighter -group /markdown/content regex \H\K\h\h$ 0:PrimarySelection def -hidden markdown-indent-on-new-line %{ eval -draft -itersel %{ # copy block quote(s), list item prefix and following white spaces - try %{ exec -draft k s ^\h*\K((>\h*)|[*+-])+\h* y gh j P } + try %{ exec -draft k s ^\h*\K((>\h*)+([*+-]\h)?|(>\h*)*[*+-]\h)\h* y gh j P } # preserve previous line indent try %{ exec -draft \; K } # remove trailing white spaces diff --git a/test/indent/markdown/inside-strong-emphasis/cmd b/test/indent/markdown/inside-strong-emphasis/cmd new file mode 100644 index 00000000..54aed4f8 --- /dev/null +++ b/test/indent/markdown/inside-strong-emphasis/cmd @@ -0,0 +1 @@ +i diff --git a/test/indent/markdown/inside-strong-emphasis/in b/test/indent/markdown/inside-strong-emphasis/in new file mode 100644 index 00000000..1f6d4b18 --- /dev/null +++ b/test/indent/markdown/inside-strong-emphasis/in @@ -0,0 +1 @@ +**strong %(e)mphasis** diff --git a/test/indent/markdown/inside-strong-emphasis/out b/test/indent/markdown/inside-strong-emphasis/out new file mode 100644 index 00000000..3c878b78 --- /dev/null +++ b/test/indent/markdown/inside-strong-emphasis/out @@ -0,0 +1,2 @@ +**strong +emphasis** diff --git a/test/indent/markdown/inside-strong-emphasis/rc b/test/indent/markdown/inside-strong-emphasis/rc new file mode 100644 index 00000000..7b9ff85e --- /dev/null +++ b/test/indent/markdown/inside-strong-emphasis/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/base/markdown.kak" +set buffer filetype markdown diff --git a/test/indent/markdown/open-after-setext-heading-2/cmd b/test/indent/markdown/open-after-setext-heading-2/cmd new file mode 100644 index 00000000..13e7564e --- /dev/null +++ b/test/indent/markdown/open-after-setext-heading-2/cmd @@ -0,0 +1 @@ +o diff --git a/test/indent/markdown/open-after-setext-heading-2/in b/test/indent/markdown/open-after-setext-heading-2/in new file mode 100644 index 00000000..831d9d37 --- /dev/null +++ b/test/indent/markdown/open-after-setext-heading-2/in @@ -0,0 +1,2 @@ +Some Heading +%(-)----------- diff --git a/test/indent/markdown/open-after-setext-heading-2/out b/test/indent/markdown/open-after-setext-heading-2/out new file mode 100644 index 00000000..4ff5ae19 --- /dev/null +++ b/test/indent/markdown/open-after-setext-heading-2/out @@ -0,0 +1,3 @@ +Some Heading +------------ + diff --git a/test/indent/markdown/open-after-setext-heading-2/rc b/test/indent/markdown/open-after-setext-heading-2/rc new file mode 100644 index 00000000..7b9ff85e --- /dev/null +++ b/test/indent/markdown/open-after-setext-heading-2/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/base/markdown.kak" +set buffer filetype markdown