Skip to content

Commit

Permalink
Merge branch 'st3-develop' into st3176
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed May 29, 2022
2 parents e8761eb + 0fc7c30 commit 31e1ef2
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 88 deletions.
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Following key bindings may be used to create or toggle tasks.
| Linux/Windows | MacOS | Description
|---------------|-------|-------------
| <kbd>Alt</kbd> + <kbd>t</kbd> | <kbd>⌘</kbd> + <kbd>⌥</kbd> + <kbd>t</kbd> | Creates new GFM task (`* [ ] task`)
| <kbd>Alt</kbd> + <kbd>x</kbd> | <kbd>⌘</kbd> + <kbd>⌥</kbd> + <kbd>x</kbd> | Toggles GFM task check marks (`* [X] task`)
| <kbd>Alt</kbd> + <kbd>x</kbd> | <kbd>⌘</kbd> + <kbd>⌥</kbd> + <kbd>x</kbd> | Toggles GFM task check marks (`* [x] task`)

# References

Expand Down
23 changes: 15 additions & 8 deletions make.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,25 @@ goto :usage

:RELEASE
if "%2"== "" goto :usage
if not exist "messages/release-%2.md" (
echo Missing release-%2.md
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 %2 --no-ff
git checkout st3176 && git merge st3-develop --no-ff
if not errorlevel 0 (
echo Unable to merge %2 into st3176!
echo Unable to merge st3-develop into st3176!
exit /b 1
)
git checkout master && git merge %2 --no-ff
git checkout master && git merge st4-develop --no-ff
if not errorlevel 0 (
echo Unable to merge %2 into master!
echo Unable to merge st4-develop into master!
exit /b 1
)
echo Hit any key to push branches!
Expand All @@ -81,9 +88,9 @@ goto :usage
echo Hit any key to publish release!
pause
: create release for ST3
gh release create --target st3176 -t "MarkdownEditing %2 (ST3176+)" -F "messages/release-%2.md" "3176-%2"
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/release-%2.md" "4107-%2"
gh release create --target master -t "MarkdownEditing %2 (ST4107+)" -F "messages/%st4_changelog%" "4107-%2"
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 @@ -37,5 +37,6 @@
"3.1.0": "messages/3.1.0.md",
"3.1.1": "messages/3.1.1.md",
"3.1.2": "messages/3.1.2.md",
"3.1.3": "messages/3.1.3.md"
"3.1.3": "messages/3.1.3.md",
"3.1.4": "messages/3.1.4.md"
}
16 changes: 16 additions & 0 deletions messages/3.1.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MarkdownEditing 3.1.4 Changelog

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

## Bug Fixes

## New Features

* syntax highlighting for _Twee_ in fenced code blocks

## Changes

* Use lower case `x` for completed gfm tasks `- [x] task` (#696)

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
12 changes: 6 additions & 6 deletions plugins/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,21 @@ class MdeToggleTaskListItemCommand(MdeTextCommand):
**Examples:**
```markdown
# Orderd Task List
# Ordered Task List
1. [ ] task 1
2. [X] task 2
2. [x] task 2
# Unorderd Task List
# Unordered Task List
* [ ] task 1
- [X] task 2
- [x] task 2
+ [ ] task 3
# Quoted Task List
> * [ ] task 1
> * [X] task 2
> * [x] task 2
```
"""

Expand All @@ -245,7 +245,7 @@ def run(self, edit):
region.a += match.start(1)
region.b = region.a + 1

self.view.replace(edit, region, "X" if match.group(1) == " " else " ")
self.view.replace(edit, region, "x" if match.group(1) == " " else " ")


class MdeJoinLines(MdeTextCommand):
Expand Down
27 changes: 27 additions & 0 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ contexts:
- include: atx-headings
- include: setext-heading-or-paragraph

indented-markdown:
# This is a public context which can be embedded by 3rd-party syntaxes
# to support Markdown highlighting in locations of arbitrary indentation,
# but without reference to list blocks as this is an implementation detail.
# The content may diverge from list block content in future.
- include: list-block-content

###[ CONTAINER BLOCKS: BLOCK QUOTES ]#########################################

block-quotes:
Expand Down Expand Up @@ -956,6 +963,7 @@ contexts:
- include: fenced-swift
- include: fenced-terraform
- include: fenced-toml
- include: fenced-twee
- include: fenced-twig
- include: fenced-verilog
- include: fenced-xonsh
Expand Down Expand Up @@ -2155,6 +2163,25 @@ contexts:
0: meta.code-fence.definition.end.toml.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-twee:
- match: |-
(?x)
{{fenced_code_block_start}}
((?i:twee))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.twee.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
embed: scope:text.twee
embed_scope:
markup.raw.code-fence.twee.markdown-gfm
text.twee.embedded.markdown
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.twee.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-twig:
- match: |-
(?x)
Expand Down
1 change: 0 additions & 1 deletion syntaxes/MultiMarkdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ contexts:
captures:
0: meta.frontmatter.multimarkdown
1: punctuation.section.block.begin.frontmatter.multimarkdown
2: constant.other.language-name.multimarkdown
embed: frontmatter-content
embed_scope: meta.frontmatter.multimarkdown
escape: ^(---|\.{3})\s*\n
Expand Down
39 changes: 4 additions & 35 deletions tests/syntax_test_multimarkdown.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
T: SYNTAX TEST "Packages/MarkdownEditing/syntaxes/MultiMarkdown.sublime-syntax"
Title: A Sample MultiMarkdown Document
T: ^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Author: Fletcher T. Penney
T:^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Date: February 9, 2011
Comment: This is a comment intended to demonstrate
metadata that spans multiple lines, yet
is treated as a single value.
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Test: And this is a new key-value pair
With-Dash: Test
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
With Space: Test
T: ^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
HTML Header: <style>
body { width:100ex; margin:auto; text-align:justify; }
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown source.css.embedded.html
HTML Header: <style>
body { width:100ex; margin:auto; text-align:justify; }
/* Some more style. */
</style>
T: ^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown meta.tag.style.end.html
| SYNTAX TEST "Packages/MarkdownEditing/syntaxes/MultiMarkdown.sublime-syntax"

T: <- - meta.frontmatter.multimarkdown
# Heading
T: <- markup.heading punctuation.definition.heading - meta.frontmatter.multimarkdown
T:^^^^^^^ markup.heading - meta.frontmatter.multimarkdown
# MultiMarkdown without frontmatter
| <- markup.heading.1.markdown punctuation.definition.heading.begin.markdown
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.heading.1.markdown
36 changes: 36 additions & 0 deletions tests/syntax_test_multimarkdown_frontmatter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
T: SYNTAX TEST "Packages/MarkdownEditing/syntaxes/MultiMarkdown.sublime-syntax"
Title: A Sample MultiMarkdown Document
T: ^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Author: Fletcher T. Penney
T:^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Date: February 9, 2011
Comment: This is a comment intended to demonstrate
metadata that spans multiple lines, yet
is treated as a single value.
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
Test: And this is a new key-value pair
With-Dash: Test
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
With Space: Test
T: ^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.key.multimarkdown entity.other.attribute-name.multimarkdown
T: ^ meta.frontmatter.multimarkdown meta.mapping.multimarkdown punctuation.separator.key-value.multimarkdown
T: ^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown
HTML Header: <style>
body { width:100ex; margin:auto; text-align:justify; }
T: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown source.css.embedded.html
HTML Header: <style>
body { width:100ex; margin:auto; text-align:justify; }
/* Some more style. */
</style>
T: ^^^^^^^^ meta.frontmatter.multimarkdown meta.mapping.value.multimarkdown meta.tag.style.end.html

T: <- - meta.frontmatter.multimarkdown
# Heading
T: <- markup.heading punctuation.definition.heading - meta.frontmatter.multimarkdown
T:^^^^^^^ markup.heading - meta.frontmatter.multimarkdown
Loading

0 comments on commit 31e1ef2

Please sign in to comment.