Skip to content

Commit 64e8083

Browse files
authored
Merge branch 'st4-develop' into fr-embed-bbcode
2 parents 67b1d50 + 412afdf commit 64e8083

File tree

7 files changed

+99
-3
lines changed

7 files changed

+99
-3
lines changed

Default (Linux).sublime-keymap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@
195195
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
196196
]
197197
},
198+
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
199+
[
200+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true },
201+
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
202+
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
203+
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
204+
]
205+
},
198206
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
199207
[
200208
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },

Default (OSX).sublime-keymap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@
195195
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
196196
]
197197
},
198+
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
199+
[
200+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true },
201+
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
202+
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
203+
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
204+
]
205+
},
198206
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
199207
[
200208
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },

Default (Windows).sublime-keymap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,15 @@
195195
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
196196
]
197197
},
198+
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
199+
[
200+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true },
201+
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
202+
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
203+
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
204+
]
205+
},
206+
198207
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
199208
[
200209
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },

Preferences.sublime-settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
// Default keys: (OSX/Linux/Win): alt+k, alt+0..9
156156
"mde.keymap_disable.set_heading_level": false,
157157
// Jump between link/image/footnote reference and definition
158-
// Default keys: (OSX)super+ctrl+shift+l (Linux/Win)ctrl+alt+g
158+
// Default keys: (OSX/Linux/Win): f12, shift+f12
159159
"mde.keymap_disable.reference_jump": false,
160160
// Add a new link
161161
// Default keys: (OSX)super+alt+r (Linux/Win)ctrl+super+r

messages/next.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ feedback you can use [GitHub issues][issues].
66
## Bug Fixes
77

88
## New Features
9+
910
* Add BBCode support for fenced code block
11+
* Add support for KDL fenced code blocks - auto-v1/2-selection variant `kdl` as well as forced v1/v2 variants `kdl1` and `kdl2`
1012

1113
## Changes
1214

plugins/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _debounced_callback(view, callback):
2828
if not view.is_valid():
2929
del call_at[view.view_id]
3030
return
31-
diff = call_at[view.view_id] - now() * 1000
31+
diff = call_at[view.view_id] - int(now() * 1000)
3232
if diff > 0:
3333
set_timeout(partial(_debounced_callback, view, callback), diff)
3434
else:
@@ -39,7 +39,7 @@ def _debounced_callback(view, callback):
3939
def wrapper(self, *args, **kwargs):
4040
view = self.view if hasattr(self, "view") else args[0]
4141
pending = view.view_id in call_at
42-
call_at[view.view_id] = now() * 1000 + delay_in_ms
42+
call_at[view.view_id] = int(now() * 1000) + delay_in_ms
4343
if pending:
4444
return
4545
callback = partial(func, self, *args, **kwargs)

syntaxes/Markdown.sublime-syntax

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,9 @@ contexts:
13931393
- include: fenced-jade
13941394
- include: fenced-julia
13951395
- include: fenced-kotlin
1396+
- include: fenced-kdl
1397+
- include: fenced-kdl1
1398+
- include: fenced-kdl2
13961399
- include: fenced-less
13971400
- include: fenced-mermaid
13981401
- include: fenced-nim
@@ -2813,6 +2816,72 @@ contexts:
28132816
1: punctuation.definition.raw.code-fence.end.markdown
28142817
2: meta.fold.code-fence.end.markdown
28152818
2819+
fenced-kdl:
2820+
- match: |-
2821+
(?x)
2822+
{{fenced_code_block_start}}
2823+
(?i:\s*(kdl))
2824+
{{fenced_code_block_trailing_infostring_characters}}
2825+
captures:
2826+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2827+
2: punctuation.definition.raw.code-fence.begin.markdown
2828+
5: constant.other.language-name.markdown
2829+
6: comment.line.infostring.markdown
2830+
7: meta.fold.code-fence.begin.markdown
2831+
embed: scope:text.kdl
2832+
embed_scope:
2833+
markup.raw.code-fence.kdl.markdown-gfm
2834+
text.kdl
2835+
escape: '{{fenced_code_block_escape}}'
2836+
escape_captures:
2837+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2838+
1: punctuation.definition.raw.code-fence.end.markdown
2839+
2: meta.fold.code-fence.end.markdown
2840+
2841+
fenced-kdl1:
2842+
- match: |-
2843+
(?x)
2844+
{{fenced_code_block_start}}
2845+
(?i:\s*(kdl1))
2846+
{{fenced_code_block_trailing_infostring_characters}}
2847+
captures:
2848+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2849+
2: punctuation.definition.raw.code-fence.begin.markdown
2850+
5: constant.other.language-name.markdown
2851+
6: comment.line.infostring.markdown
2852+
7: meta.fold.code-fence.begin.markdown
2853+
embed: scope:text.kdl.1
2854+
embed_scope:
2855+
markup.raw.code-fence.kdl.markdown-gfm
2856+
text.kdl.1
2857+
escape: '{{fenced_code_block_escape}}'
2858+
escape_captures:
2859+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2860+
1: punctuation.definition.raw.code-fence.end.markdown
2861+
2: meta.fold.code-fence.end.markdown
2862+
2863+
fenced-kdl2:
2864+
- match: |-
2865+
(?x)
2866+
{{fenced_code_block_start}}
2867+
(?i:\s*(kdl2))
2868+
{{fenced_code_block_trailing_infostring_characters}}
2869+
captures:
2870+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2871+
2: punctuation.definition.raw.code-fence.begin.markdown
2872+
5: constant.other.language-name.markdown
2873+
6: comment.line.infostring.markdown
2874+
7: meta.fold.code-fence.begin.markdown
2875+
embed: scope:text.kdl.2
2876+
embed_scope:
2877+
markup.raw.code-fence.kdl.markdown-gfm
2878+
text.kdl.2
2879+
escape: '{{fenced_code_block_escape}}'
2880+
escape_captures:
2881+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2882+
1: punctuation.definition.raw.code-fence.end.markdown
2883+
2: meta.fold.code-fence.end.markdown
2884+
28162885
fenced-less:
28172886
- match: |-
28182887
(?x)

0 commit comments

Comments
 (0)