Skip to content

Commit

Permalink
Merge branch 'st3-develop' into st4-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Jan 20, 2023
2 parents bff21d0 + d9d5230 commit 8d7d179
Show file tree
Hide file tree
Showing 25 changed files with 272 additions and 227 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
- 'x64'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
syntax_tests:
name: Sublime Text ${{ matrix.build }}
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
timeout-minutes: 15 # default is 6 hours!
strategy:
matrix:
Expand All @@ -33,7 +33,7 @@ jobs:
- build: latest
default_packages: master
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: SublimeText/syntax-test-action@v2
with:
build: ${{ matrix.build }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ on:
jobs:
test:
name: Sublime Text ${{ matrix.st-version }}
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
timeout-minutes: 15 # default is 6 hours!
strategy:
fail-fast: false
matrix:
st-version: [4]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: SublimeText/UnitTesting/actions/setup@v1
with:
sublime-text-version: ${{ matrix.st-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
build:
name: Deploy Docs to Github Pages
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
Expand Down
4 changes: 2 additions & 2 deletions Context.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
},
{
"caption": "Fold Section",
"command": "mde_fold_section_context"
"command": "mde_fold_section"
},
{
"caption": "Unfold Section",
"command": "mde_unfold_section_context"
"command": "mde_unfold_section"
},
{
"caption": "-",
Expand Down
14 changes: 5 additions & 9 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -678,24 +678,20 @@
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["ctrl+shift+["], "command": "mde_fold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^\\s+", "match_all": true }
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["ctrl+shift+]"], "command": "mde_unfold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "text", "operator": "regex_contains", "operand": "^(#{1,6}(?!#))|^(-{3,}|={3,})$"}
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["ctrl+shift+tab"], "command": "mde_show_fold_all_sections", "context":
Expand Down
14 changes: 5 additions & 9 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -678,24 +678,20 @@
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["super+shift+["], "command": "mde_fold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^\\s+", "match_all": true }
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["super+shift+]"], "command": "mde_unfold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "text", "operator": "regex_contains", "operand": "^(#{1,6}(?!#))|^(-{3,}|={3,})$"}
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["ctrl+shift+tab"], "command": "mde_show_fold_all_sections", "context":
Expand Down
14 changes: 5 additions & 9 deletions Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -678,24 +678,20 @@
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["ctrl+shift+["], "command": "mde_fold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^\\s+", "match_all": true }
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["shift+tab"], "command": "mde_fold_section", "context":
{ "keys": ["ctrl+shift+]"], "command": "mde_unfold_section", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.list", "match_all": true },
{ "key": "setting.mde.keymap_disable.fold_section", "operator": "not_equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "text", "operator": "regex_contains", "operand": "^(#{1,6}(?!#))|^(-{3,}|={3,})$"}
{ "key": "overlay_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["ctrl+shift+tab"], "command": "mde_show_fold_all_sections", "context":
Expand Down
6 changes: 5 additions & 1 deletion Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@
//

{
"caption": "MarkdownEditing: Toggle Folding Current Section",
"caption": "MarkdownEditing: Fold Current Section",
"command": "mde_fold_section"
},
{
"caption": "MarkdownEditing: Unold Current Section",
"command": "mde_unfold_section"
},
{
"caption": "MarkdownEditing: Fold Level 1 Sections",
"command": "mde_fold_all_sections",
Expand Down
18 changes: 13 additions & 5 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,21 @@ Adding or removing `#` at the beginning of lines also modifies heading levels im
Irrelevant sections of documents can be folded/collapsed via Command Palette:
* **MarkdownEditing: Toggle Folding Current Section**
Whether child sections are folded or unfolded as well depends on folding level defined by calling one of the following commands.
* **MarkdownEditing: Fold Current Section**
Whether child sections are folded depends on folding level defined by calling one of the following commands.
If `Fold All Sections` was called before _("outline mode" is active)_, the region between current and following sibling or child heading is (un)folded only.
If `Fold All Sections` was called before _("outline mode" is active)_, the region between current and following sibling or child heading is folded only.
If `Unfold All Sections` was called before, all child sections are folded.
* **MarkdownEditing: Unfold Current Section**
Whether child sections are unfolded depends on folding level defined by calling one of the following commands.
If `Fold All Sections` was called before _("outline mode" is active)_, the region between current and following sibling or child heading is unfolded only.
If `Fold Level 1-6 Sections` was called before, all child sections with lower level keep folded when unfolding their parent section.
If `Unfold All Sections` was called before, all child sections are (un)folded.
If `Unfold All Sections` was called before, all child sections are unfolded.
* **MarkdownEditing: Fold Level 1-6 Sections**
Folds all sections of headings of specific level. Also hides lower level headings.
Expand All @@ -158,7 +165,8 @@ Folding is bound to following keys by default:
| <kbd>Ctrl</kbd> + <kbd>k</kbd>, <kbd>Ctrl</kbd> + <kbd>0</kbd> | <kbd>⌥</kbd> + <kbd>k</kbd>, <kbd>⌥</kbd> + <kbd>0</kbd> | Unfold all sections
| <kbd>Ctrl</kbd> + <kbd>k</kbd>, <kbd>Ctrl</kbd> + <kbd>1..6</kbd> | <kbd>⌥</kbd> + <kbd>k</kbd>, <kbd>⌥</kbd> + <kbd>1..6</kbd> | Fold sections by level 1..6
| <kbd>Ctrl</kbd> + <kbd>k</kbd>, <kbd>Ctrl</kbd> + <kbd>9</kbd> | <kbd>⌥</kbd> + <kbd>k</kbd>, <kbd>⌥</kbd> + <kbd>9</kbd> | Fold all sections, but keep headings of any level visible
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>⇧</kbd> + <kbd>Tab</kbd> | Fold/Unfold current section.
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> | <kbd>^</kbd> + <kbd>⇧</kbd> + <kbd>Tab</kbd> | Fold current section.
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> | <kbd>^</kbd> + <kbd>⇧</kbd> + <kbd>Tab</kbd> | Unfold current section.
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>^</kbd> + <kbd>⇧</kbd> + <kbd>Tab</kbd> | Fold all sections under headings of a certain level.
## Automatic Link Url Folding
Expand Down
39 changes: 23 additions & 16 deletions make.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,7 @@ goto :usage

:RELEASE
if "%2"== "" goto :usage
set st3_changelog=release-st3-%2.md
set st4_changelog=release-st4-%2.md

if not exist "messages/%st3_changelog%" (
echo Missing %st3_changelog%
exit /b 1
)
if not exist "messages/%st4_changelog%" (
echo Missing %st4_changelog%
exit /b 1
)
git checkout st3176 && git merge st3-develop --no-ff
if not errorlevel 0 (
echo Unable to merge st3-develop into st3176!
Expand All @@ -85,12 +75,29 @@ goto :usage
echo Failed to push master!
exit /b 1
)
echo Hit any key to publish release!
pause
: create release for ST3
gh release create --target st3176 -t "MarkdownEditing %2 (ST3176+)" -F "messages/%st3_changelog%" "3176-%2"
: create release for ST3
gh release create --target master -t "MarkdownEditing %2 (ST4107+)" -F "messages/%st4_changelog%" "4107-%2"

for %%d in ("%~dp0.") do set package=%%~nxd

echo Createing assets for "%package%"...

:: create downloadable asset for ST4126+
set build=3176
set archive=%package%-%2-st%build%.sublime-package
set assets="%archive%#%archive%"
call git tag -f %build%-%2 st%build%
call git archive --format zip -o "%archive%" %build%-%2

:: create downloadable asset for ST4134+
set build=4107
set archive=%package%-%2-st%build%.sublime-package
set assets=%assets% "%archive%#%archive%"
call git tag -f %build%-%2 master
call git archive --format zip -o "%archive%" %build%-%2

:: create the release
call git push --tags --force
gh release create --target master -t "%package% %2" "%2" %assets%
del /f /q *.sublime-package
git fetch
goto :eof

Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@
"3.1.5": "messages/3.1.5.md",
"3.1.6": "messages/3.1.6.md",
"3.1.7": "messages/3.1.7.md",
"3.1.8": "messages/3.1.8.md"
"3.1.8": "messages/3.1.8.md",
"3.1.9": "messages/3.1.9.md"
}
25 changes: 25 additions & 0 deletions messages/3.1.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# MarkdownEditing 3.1.9 Changelog

Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of
feedback you can use [GitHub issues][issues].

## Bug Fixes

* Remove blank spaces critic markup snippets (#711)
* Fix duplicate Markdown syntaxes (#717)

## New Features

## Changes

* MarkdownEditing no longer disables but augoments ST's default Markdown
package. Hence you'll no longer find MarkdownEditing/Markdown syntax.

This change is required to properly support 3rd-party packages which
extend default Markdown syntax in ST4.

* Replace "Toggle Folding Current Section" via <kbd>shift+tab</kbd> by
- "Fold Current Section" via <kbd>ctrl+shift+[</kbd>
- "Unfold Current Section" via <kbd>ctrl+shift+]</kbd>

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ markdown_extensions:
custom_checkbox: true
- pymdownx.progressbar:
- pymdownx.arithmatex:
- pymdownx.magiclink:
repo_url_shortener: true
repo_url_shorthand: true
user: SublimeText-Markdown
repo: MarkdownEditing
- pymdownx.mark:
- pymdownx.tilde:
- pymdownx.striphtml:
Expand Down
10 changes: 6 additions & 4 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
MdeFoldLinksCommand,
MdeFoldLinksListener,
MdeFoldSectionCommand,
MdeFoldSectionContextCommand,
MdeShowFoldAllSectionsCommand,
MdeUnfoldAllSectionsCommand,
MdeUnfoldSectionContextCommand,
MdeUnfoldSectionCommand,
)
from .plugins.footnotes import (
MdeGatherMissingFootnotesCommand,
Expand Down Expand Up @@ -110,8 +109,11 @@
)

def plugin_loaded():
load_logger()
on_after_install()
def worker():
load_logger()
on_after_install()

sublime.set_timeout(worker, 10)

def plugin_unloaded():
unload_logger()
Expand Down
Loading

0 comments on commit 8d7d179

Please sign in to comment.