Skip to content

Commit

Permalink
Merge branch 'st4-develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Aug 27, 2023
2 parents feaa639 + 7c71f62 commit 38bb411
Show file tree
Hide file tree
Showing 11 changed files with 745 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
lint:
name: Python ${{ matrix.python }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
python:
Expand Down
83 changes: 55 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,84 @@

## Where to Begin

Development is based on milestones. Each milestone will be implemented in its own branch (e.g. branch `v2.0.4`).
Development is proceeding in development branches for compatible ST builds:

The first thing you should do is determining the branch to base your edits on.
| develop branch | target branch | ST builds
| --- | --- | ---
| st3-develop | ST3176 | 3176 - 4106
| st4-develop | master | 4107...

If you are fixing an issue that already exists in the issue tracker, see which milestone it belongs to and commit your contribution to the branch with the same name as the milestone. If the issue doesn't belong to a milestone;
> **Note**
>
> Currently main difference between ST3 and ST4 branches
> is syntax definition using `version: 2` in ST4.
* __push-access users__: assign it to the closest milestone.
* __non-push-access users__: pick the closest milestone.
Common improvements for ST3 and ST4 should be based on and merged into `st3-develop`.
It is frequently merged into `st4-develop`, if required.

If your contribution is independent from the issue tracker, pick the closest milestone and create your commits in that branch.
Only changes, which require ST4, are based on and merged directly into `st4-develop`.

If the milestone branch doesn't exist yet;
New releases will be created, if enough or critical fixes are available.

* __push-access users__: create it. The format is e.g. `v2.0.4` and increments decimally. It is _not semver_.
* __non-push-access users__: pick `master` branch.

After you've done with your commits;

* __push-access users__: push your local branch to the same named branch on GitHub.
* __non-push-access users__: send a pull request from your local branch to the same named branch on GitHub.

Each milestone will have a pull request that will be kept open until the milestone is completed. The purpose of this is having a showcase and discussion page for the milestone. You can describe there what you have implemented, preferably using screenshots. It's also an early feedback place for the users about your contribution.
Release version number will be determined based on amount and kind of changes.

## General Guidelines

* Code formatting:
- __Indentation__: 4 spaces
- __Line endings__: `\n`
* If your contribution deserves a place in `README.md`, please do so. Preferably in the same commit with your modifications.
* If you want to add screenshots to `README.md`, put your images under `screenshots/` directory. For creating your screenshots, you can use markdown files under `samples/` directory.
* We create __changelog__ files for Package Manager updates. They are under `messages/` directory.

If your contribution deserves a place under one of the "Bug Fixes", "New Features", "Changes" titles, please do so. Preferably in the same commit with your modifications.
* If your contribution deserves a place in `README.md`, please do so.
Preferably in the same commit with your modifications.

Consider updating

* We create __changelog__ files for Package Manager updates.
They are under `messages/` directory.

You have to edit the changelog that belongs to the branch you've worked on. For example, if you have based your commits on branch `v2.0.4`, then the changelog you should edit is `messages/2.0.4.md`.
If your contribution deserves a place under one of
the "Bug Fixes", "New Features", "Changes" titles,
please do so.
Preferably in the same commit with your modifications.

If the changelog file doesn't exist yet, create it by copying `messages/template.md` as a template.
Changelog is created in `messages/next.md`.
It will be renamed to match release version number
as part of the release workflow.

* If you are defining a new __key binding__, please define for all the 3 OSs in their own `.sublime-keymap` files. You have to insert your edits into the exacly same place in the 3 files.
* If you want to introduce a new setting key for one of the `.sublime-settings` files, use `mde.` prefix in your setting key.
* For testing your changes, you can use the test files under `tests/`. You can extend those files to add new tests and edge cases.
* If you are defining a new __key binding__,
please define for all the 3 OSs in their own `.sublime-keymap` files.
You have to insert your edits into the exactly same place in the 3 files.

* Setting keys are added to one of the `.sublime-settings` files,
using `mde.` prefix and a description comment.

* For testing your changes, you can use the test files under `tests/`.
You can extend those files to add new tests and edge cases.

## Publishing to Package Control

When the milestone is completed, push-access users can publish the new version to the Package Control. Creating the new version __tag__ on the GitHub repository is enough for this. For example, if the name of the milestone is `v2.0.4`, the tag should be `2.0.4`.
> **Note**
>
> For push-access users, only!
For each target:

1. check and update changelog.
2. determine version number.
3. rename changelog `messages/next.md` to `messages/<version>.md`
4. add a corresponding entry in `messages.json`
5. merge development branch into target branch (e.g.: `st3-develop` => `st3176`)
6. create and push a tag in form `<build>-<version>` (e.g. `3176-2.3.4`)

The update process may take __up to an hour__ depending on the crawl frequency by the Package Control.
The update process may take __up to an hour__
depending on the crawl frequency by the Package Control.

## Contributing to themes

Here are the used scopes under 3 different markdown flavors. If you are not sure about how the scopes are used, checkout .tmlanguage files or ask in issues. __Unique__ scopes are marked as bold.
Here are the used scopes under 3 different markdown flavors.
If you are not sure about how the scopes are used,
checkout .sublime-syntax files or ask in issues.
__Unique__ scopes are marked as bold.

### ScopeName: text.html.markdown

Expand Down
57 changes: 53 additions & 4 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,55 @@
]
},

//
// The following key bindings enforce indentation by 2 chars in YAML frontmatter
// without regards to syntax specific or global indentation settings,
// to avoid YAML parsing errors.
//

// insert newline and indent it by two chars
{ "keys": ["enter"], "command": "insert_snippet", "args": { "contents": "\n" }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
]
},
// indent by one char if line starts with odd amount of spaces
{ "keys": ["tab"], "command": "insert", "args": { "characters": " " }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*[ ]$" }
]
},
// indent by two chars if line starts with even amount of spaces
{ "keys": ["tab"], "command": "insert", "args": { "characters": " " }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},
// unindent by one char if line starts with odd amount of spaces
{ "keys": ["shift+tab"], "command": "left_delete", "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*[ ]$" }
]
},
// unindent by two chars if line starts with even amount of spaces
{ "keys": ["shift+tab"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Left 2.sublime-macro"}, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},
// unindent by two chars if line starts with even amount of spaces
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Left 2.sublime-macro"}, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},

//
// Auto-Pairing Astersisks
//
Expand Down Expand Up @@ -947,7 +996,7 @@
// Unindent list item no matter of caret position if `shift_tab_unindent` is set
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
Expand All @@ -957,7 +1006,7 @@
// Unindent list item if caret is in front of bullets
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*$", "match_all": true },
Expand All @@ -967,7 +1016,7 @@
// Unindent list item if caret is behind bullets
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*[-+*]\\s*$", "match_all": true },
Expand All @@ -977,7 +1026,7 @@
// Unindent list item if caret is at eol
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s", "match_all": true },
Expand Down
57 changes: 53 additions & 4 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,55 @@
]
},

//
// The following key bindings enforce indentation by 2 chars in YAML frontmatter
// without regards to syntax specific or global indentation settings,
// to avoid YAML parsing errors.
//

// insert newline and indent it by two chars
{ "keys": ["enter"], "command": "insert_snippet", "args": { "contents": "\n" }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
]
},
// indent by one char if line starts with odd amount of spaces
{ "keys": ["tab"], "command": "insert", "args": { "characters": " " }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*[ ]$" }
]
},
// indent by two chars if line starts with even amount of spaces
{ "keys": ["tab"], "command": "insert", "args": { "characters": " " }, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},
// unindent by one char if line starts with odd amount of spaces
{ "keys": ["shift+tab"], "command": "left_delete", "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*[ ]$" }
]
},
// unindent by two chars if line starts with even amount of spaces
{ "keys": ["shift+tab"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Left 2.sublime-macro"}, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},
// unindent by two chars if line starts with even amount of spaces
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Left 2.sublime-macro"}, "context":
[
{ "key": "selector", "operand": "text.html.markdown meta.frontmatter source.yaml" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "(?:[ ]{2})*$" }
]
},

//
// Auto-Pairing Astersisks
//
Expand Down Expand Up @@ -947,7 +996,7 @@
// Unindent list item no matter of caret position if `shift_tab_unindent` is set
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
Expand All @@ -957,7 +1006,7 @@
// Unindent list item if caret is in front of bullets
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*$", "match_all": true },
Expand All @@ -967,7 +1016,7 @@
// Unindent list item if caret is behind bullets
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*[-+*]\\s*$", "match_all": true },
Expand All @@ -977,7 +1026,7 @@
// Unindent list item if caret is at eol
{ "keys": ["shift+tab"], "command": "mde_unindent_list_item", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.list", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter", "match_all": true },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*]\\s", "match_all": true },
Expand Down
Loading

0 comments on commit 38bb411

Please sign in to comment.