Skip to content

Commit f1c5baa

Browse files
8bittreelpil
authored andcommitted
Fix markdown table snippets for Ultisnips
1 parent 9181f29 commit f1c5baa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

UltiSnips/markdown.snippets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ priority -50
33
global !p
44
def create_table(snip):
55
# retrieving single line from current string and treat it like tabstops count
6-
placeholders_string = snip.buffer[snip.line].strip().split("x",1)
6+
placeholders_string = snip.buffer[snip.line].strip()[2:].split("x",1)
77
rows_amount = int(placeholders_string[0])
88
columns_amount = int(placeholders_string[1])
99
@@ -84,9 +84,8 @@ snippet fnt "Footnote"
8484
[^$1]:${2:Text}
8585
endsnippet
8686

87-
post_jump "create_table(snip)"
87+
pre_expand "create_table(snip)"
8888
snippet "tb(\d+x\d+)" "Customizable table" br
89-
`!p snip.rv = match.group(1)`
9089
endsnippet
9190

9291
# vim:ft=snippets:

0 commit comments

Comments
 (0)