diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index e7815b82..08b1c10f 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: python: - - '3.13' + - '3.14' arch: - 'x64' steps: diff --git a/.github/workflows/ci-syntax-tests.yml b/.github/workflows/ci-syntax-tests.yml index 02406dbb..d77cced3 100644 --- a/.github/workflows/ci-syntax-tests.yml +++ b/.github/workflows/ci-syntax-tests.yml @@ -39,7 +39,7 @@ jobs: - build: latest default_packages: master steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: SublimeText/syntax-test-action@v2 with: build: ${{ matrix.build }} diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 68bde5ec..3e513dd2 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' - name: Install MkDocs run: pip install -r docs/requirements.txt - name: Run MkDocs diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap index 764d9e76..745f76b0 100644 --- a/Default (Linux).sublime-keymap +++ b/Default (Linux).sublime-keymap @@ -818,62 +818,70 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, // Add line to current GFM task { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, // Extend lists (also in block quotes) { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -881,32 +889,36 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -914,6 +926,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -922,6 +935,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -930,6 +944,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -938,6 +953,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -947,6 +963,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -956,6 +973,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -965,6 +983,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -974,6 +993,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -983,6 +1003,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap index 01e6a1cd..42e5fc14 100644 --- a/Default (OSX).sublime-keymap +++ b/Default (OSX).sublime-keymap @@ -818,62 +818,70 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, // Add line to current GFM task { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, // Extend lists (also in block quotes) { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -881,32 +889,36 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -914,6 +926,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -922,6 +935,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -930,6 +944,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -938,6 +953,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -947,6 +963,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -956,6 +973,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -965,6 +983,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -974,6 +993,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -983,6 +1003,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } diff --git a/Default (Windows).sublime-keymap b/Default (Windows).sublime-keymap index 5e8bff77..ad85adab 100644 --- a/Default (Windows).sublime-keymap +++ b/Default (Windows).sublime-keymap @@ -819,62 +819,70 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true } ] }, // Add line to current GFM task { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } ] }, // Extend lists (also in block quotes) { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -882,32 +890,36 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] }, { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, - { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] }, @@ -915,6 +927,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -923,6 +936,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -931,6 +945,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -939,6 +954,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -948,6 +964,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -957,6 +974,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -966,6 +984,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -975,6 +994,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, @@ -984,6 +1004,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index db102948..7316da62 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -177,7 +177,7 @@ "mde.keymap_disable.fold_section": false, // Open a panel showing all functions related to folding // Default keys: (OSX/Linux/Win)ctrl+shift+tab - "mde.keymap_disable.show_fold_all_sections": false, + "mde.keymap_disable.show_fold_all_sections": true, // Jump to the next heading (any level/same or higher level) // Default keys: (OSX)super+ctrl/shift+pagedown (Linux/Win)ctrl+shift(+alt)+pagedown "mde.keymap_disable.goto_next_heading": false, diff --git a/messages.json b/messages.json index 4a05b93f..bd08d9ce 100644 --- a/messages.json +++ b/messages.json @@ -27,5 +27,6 @@ "3.3.0": "messages/3.3.0.md", "3.4.0": "messages/3.4.0.md", "3.5.0": "messages/3.5.0.md", - "3.6.0": "messages/3.6.0.md" + "3.6.0": "messages/3.6.0.md", + "3.6.1": "messages/3.6.1.md" } diff --git a/plugins/headings/level.py b/plugins/headings/level.py index 80b4fc1a..eb74d115 100644 --- a/plugins/headings/level.py +++ b/plugins/headings/level.py @@ -78,8 +78,7 @@ def _set_level(self, edit, calc_level, select): view = self.view match_heading_hashes = view.settings().get("mde.match_heading_hashes") pattern = re.compile( - r""" - (?x) + r"""(?x) ^([ \t>]*) # block quotes (?: (\#+) # leading hashes diff --git a/plugins/lint.py b/plugins/lint.py index 5d6a09ba..96fa3bc8 100644 --- a/plugins/lint.py +++ b/plugins/lint.py @@ -591,7 +591,21 @@ class md023(mddef): locator = r"^( +)((?:-+|=+)|(?:#{1,6}(?!#).*))$" gid = 1 + def is_inside_code_block(self, text, s, e): + def calculate_intendation(text, position): + return position - text.rfind("\n", 0, position) - 1 + + keyword = "```" + block_s = text.rfind(keyword, 0, s - 1) + block_e = text.find(keyword, e) + block_s_intendation = calculate_intendation(text, block_s) + block_e_intendation = calculate_intendation(text, block_e) + assert block_s_intendation == block_e_intendation + return e - s >= block_s_intendation + def test(self, text, s, e): + if self.is_inside_code_block(text, s, e): + return {} return {s: "%d spaces found" % (e - s)} diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index 0bb9fa57..131b83cc 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -339,7 +339,7 @@ variables: table_codespan_content: |- (?x: [^`|] # first or only char must not be a backtick or pipe. - (?:[^|]*?[^`|])? # none must be a pipe, the last additionally must not be a backtick + (?:[^|]*?[^`|])?? # none must be a pipe, the last additionally must not be a backtick ) table_end: |- diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index eb6b65b0..620b623c 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -3244,6 +3244,57 @@ test > bar | <- markup.quote punctuation.definition.blockquote - meta.table +c1 | c2 +--------- | --------- +`Row 1` | `a`, `b`, `c` +|^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm +|^^^^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.end.markdown +| ^ punctuation.separator.table-cell.markdown +| ^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.begin.markdown +| ^ punctuation.definition.raw.end.markdown +| ^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.begin.markdown +| ^ punctuation.definition.raw.end.markdown +| ^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.begin.markdown +| ^ punctuation.definition.raw.end.markdown + +c1 | c2 +--------- | --------- +`Row 2` | ``a``, ``b``, ``c`` +|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm +|^^^^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.end.markdown +| ^ punctuation.separator.table-cell.markdown +| ^^^^^ markup.raw.inline.markdown +| ^^ punctuation.definition.raw.begin.markdown +| ^^ punctuation.definition.raw.end.markdown +| ^^^^^ markup.raw.inline.markdown +| ^^ punctuation.definition.raw.begin.markdown +| ^^ punctuation.definition.raw.end.markdown +| ^^^^^ markup.raw.inline.markdown +| ^^ punctuation.definition.raw.begin.markdown +| ^^ punctuation.definition.raw.end.markdown + +c1 | c2 +--------- | --------- +`Row 3` | ```a```, ```b```, ```c``` +|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm +|^^^^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.end.markdown +| ^ punctuation.separator.table-cell.markdown +| ^^^^^^^ markup.raw.inline.markdown +| ^^^ punctuation.definition.raw.begin.markdown +| ^^^ punctuation.definition.raw.end.markdown +| ^^^^^^^ markup.raw.inline.markdown +| ^^^ punctuation.definition.raw.begin.markdown +| ^^^ punctuation.definition.raw.end.markdown +| ^^^^^^^ markup.raw.inline.markdown +| ^^^ punctuation.definition.raw.begin.markdown +| ^^^ punctuation.definition.raw.end.markdown + | c1 | c2 | c3 | c4 | c5 | c6 | c7 | --- | --- | --- | --- | --- | --- | --- | ` ` | ` me ` | `` ` `` | ` `` ` | ``foo`bar`` | ```foo`` | ``foo``` @@ -9657,11 +9708,11 @@ paragraph --- - ::: indendet-code-block + ::: indented-code-block | <- markup.raw.block.markdown |^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.raw.block.markdown - ::: indendet-code-block + ::: indented-code-block code ::: |<- markup.raw.block.markdown diff --git a/unittesting.json b/unittesting.json index 930000e2..4cd65642 100644 --- a/unittesting.json +++ b/unittesting.json @@ -2,5 +2,5 @@ "verbosity": 1, "capture_console": false, "failfast": false, - "reload_package_on_testing": false, + "reload_package_on_testing": false }