diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 8557f1ad..6b04cf08 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: python: - - '3.8' + - '3.13' arch: - 'x64' steps: @@ -40,5 +40,3 @@ jobs: run: pip install -r tests/requirements.txt - name: Run black run: python -m black --check . - - name: Run flake8 - run: python -m flake8 diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index d59b0d2f..a6d79f1e 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@v5 with: - python-version: '3.8' + python-version: '3.13' - name: Install MkDocs run: pip install -r docs/requirements.txt - name: Run MkDocs diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index 18f00cd6..62cbc8eb 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -132,6 +132,10 @@ // 1..6: fold headings by level (like ctrl+k, ctrl+1..6) "mde.auto_fold_sections.level": false, + // MarkdownEditing (Journal): + // date and time format of journal files + "mde.journal.dateformat": "%Y-%m-%d", + // MarkdownEditing (Wiki): // wiki file extensions "mde.wikilinks.markdown_extension": ".md", diff --git a/messages.json b/messages.json index 518b2542..8af8b08b 100644 --- a/messages.json +++ b/messages.json @@ -1,31 +1,5 @@ { "install": "messages/install.md", - "2.0.0": "messages/2.0.0.txt", - "2.0.1": "messages/2.0.1.md", - "2.0.2": "messages/2.0.2.md", - "2.0.3": "messages/2.0.3.md", - "2.0.4": "messages/2.0.4.md", - "2.0.5": "messages/2.0.5.md", - "2.0.6": "messages/2.0.6.md", - "2.0.7": "messages/2.0.7.md", - "2.0.8": "messages/2.0.8.md", - "2.0.9": "messages/2.0.9.md", - "2.1.0": "messages/2.1.0.md", - "2.1.1": "messages/2.1.1.md", - "2.1.2": "messages/2.1.2.md", - "2.1.3": "messages/2.1.3.md", - "2.1.4": "messages/2.1.4.md", - "2.1.5": "messages/2.1.5.md", - "2.1.6": "messages/2.1.6.md", - "2.1.7": "messages/2.1.7.md", - "2.1.8": "messages/2.1.8.md", - "2.1.9": "messages/2.1.9.md", - "2.2.0": "messages/2.2.0.md", - "2.2.1": "messages/2.2.1.md", - "2.2.2": "messages/2.2.2.md", - "2.2.3": "messages/2.2.3.md", - "2.2.4": "messages/2.2.4.md", - "2.2.10": "messages/2.2.10.md", "3.0.0": "messages/3.0.0.md", "3.0.1": "messages/3.0.1.md", "3.0.2": "messages/3.0.2.md", @@ -50,5 +24,6 @@ "3.1.13": "messages/3.1.13.md", "3.1.14": "messages/3.1.14.md", "3.2.0": "messages/3.2.0.md", - "3.3.0": "messages/3.3.0.md" + "3.3.0": "messages/3.3.0.md", + "3.4.0": "messages/3.4.0.md" } diff --git a/messages/2.0.0.txt b/messages/2.0.0.txt deleted file mode 100644 index b65adcf3..00000000 --- a/messages/2.0.0.txt +++ /dev/null @@ -1,40 +0,0 @@ -# MarkdownEditing 2.0.0 Changelog - -This is a major release for MarkdownEditing. In this document, you will find information about the update. - -This release adds a syntax file for __GitHub flavored Markdown__ and makes it default for Markdown extensions (md, txt). - -Sublime text has a native tiny package for Markdown. However, when MarkdownEditing is enabled, native package causes some conflicts. For this reason, MarkdownEditing will automatically disable it. Since it doesn't bring anything new over MarkdownEditing, this is not a loss. But remember, when you disable/remove MarkdownEditing, you have to reenable the native one manually (if you want). - -It's suggested you take a look at `Packages\MarkdownEditing\README.md` file. - -Feedback is always welcome. MarkdownEditing is hosted on https://github.com/ttscoff/MarkdownEditing/. What features would you like to see in the next version? - -## Notable Features - -* Dark and yellow themes added. In order to enable them, put one of these lines in `Packages\User\Markdown.sublime-settings`: - `"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme"` - `"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme"` -* Option to keep current line centered as writing goes on. Check `Packages\MarkdownEditing\Markdown.sublime-settings` file to see how to enable it. -* Better highlighting for blockquotes. -* Improved symbol list (Ctrl+R). - - More readable indentation - - Shows underlined headers, too -* Grey out only tag parts in XML/HTML tags, not the whole content. -* Many syntax improvements and bug fixes. -* More powerful bolding/italicizing. - - If there is no selection, it will apply it to the word under the cursor. - - It won't re-apply bold/italic if it already is. - - It will convert to _italic_ with Ctrl I even if it is __bold__ at that moment and vice versa. - -## GitHub flavored Markdown Specific Features - -* Syntax highlighting in fenced code blocks. -* GitHub style strikethrough (`~~`). -* Underscores in snake case words doesn't make it italic. -* Highlights `` tag differently. - -## Changes - -* _Bold_ and _italic_ keybindings are changed to Ctrl+B and Ctrl+I respectively. This won't affect your other commands assigned to these keybindings for other scopes. -* `_` is used instead of `*` for bold/italic. In a future version, it is planned to be configurable. diff --git a/messages/2.0.1.md b/messages/2.0.1.md deleted file mode 100644 index 1e3cb8b0..00000000 --- a/messages/2.0.1.md +++ /dev/null @@ -1,15 +0,0 @@ -# MarkdownEditing 2.0.1 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* When autocomplete popup is visible, pressing Enter now always inserts the autocomplete item. Previously, if the cursor was for example in a list, Enter was inserting new list item ignoring the active autocomplete popup. -* Symbols in fenced code blocks will no longer be displayed in the symbol list (Ctrl R). - -## New Features - -* Markdown headers will be displayed in the Project Symbol List (Ctrl Shift R). They will start with `#`, so you will know they belong to markdown files at a glance. Also they will be on top of the list because of the presedence of `#`. -* Bold and italic markers are configurable now. Follow `Preferences > Package Settings > Markdown Editing` in the menu. See README for further help. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.0.2.md b/messages/2.0.2.md deleted file mode 100644 index ef7e18a6..00000000 --- a/messages/2.0.2.md +++ /dev/null @@ -1,16 +0,0 @@ -# MarkdownEditing 2.0.2 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## New Features - -* Ctrl B / Ctrl I will unbold/unitalicize selected text if it is already bold/italic. - -## Changes - -* Some setting keys are changed to achieve better consistency. If you used any of these in your user setting files, please reflect these changes to those files. Changes: - - `match_header_hashes` -> `mde_match_header_hashes` - - `me_keep_centered` -> `mde_keep_centered` - - `me_distraction_free_mode` -> `mde_distraction_free_mode` - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.0.3.md b/messages/2.0.3.md deleted file mode 100644 index fce2e44b..00000000 --- a/messages/2.0.3.md +++ /dev/null @@ -1,27 +0,0 @@ -# MarkdownEditing 2.0.3 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* "Gather missing links" feature was broken in ST3, fixed. -* "Fix Underlined Headers" feature was broken in ST3, fixed (thanks to @gillibrand). -* A bug related to link definitions was causing CPU hanging. Fixed. ([#111][], [#112][]) -* Link and email address detection improved. - -## New Features - -* "Gather missing links" feature is now more intelligent -* Command palette items improved -* Ctrl+B and Ctrl+I will unbold / unitalicize words without selecting them if they are already bold / italic. Cursor can be at anywhere of the word. Applies only to `_` style bolds / italics. This is because ST word selection (Ctrl+D) doesn't include `*` characters. -* Link and email address highlighting improved. - -## Changes - -* These files are renamed. If you have used them in your user keymap file, you need to update them. - - `macros/Make Word Bold.sublime-macro` -> `macros/Transform Word - Bold.sublime-macro` - - `macros/Make Word Italic.sublime-macro` -> `macros/Transform Word - Italic.sublime-macro` - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#111]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/111 -[#112]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/112 diff --git a/messages/2.0.4.md b/messages/2.0.4.md deleted file mode 100644 index fdb06f42..00000000 --- a/messages/2.0.4.md +++ /dev/null @@ -1,52 +0,0 @@ -# MarkdownEditing 2.0.4 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Separator (`***`) background color was almost unnoticeable, fixed for all the themes. -* Space obligation after `>` in blockquotes was removed in previous versions but it didn't apply to the _standard_ Markdown syntax file. Fixed. -* `<`, `>` and `&` characters inside list paragraphs was highlighted as error for _standard_ Markdown syntax. Fixed. -* Auto increment on ordered lists was broken for multi-digit numbers. Fixed. ([#109][]) - -## New Features - -* Caret is now taller similar to iA Writer. Works in only Sublime Text Build 3057 and above. -* MultiMarkdown now imports GitHub flavored markdown instead of standard markdown. - _Description_: MultiMarkdown syntax file doesn't redefine things, instead imports standard markdown syntax file. With this version, it imports GFM syntax file instead of the standard one. GFM has had many bug fixes and improvements over the standard md syntax file. So hopefully, MultiMarkdown users will benefit from this improvements, too. -* Pressing `Tab` on a blank list item now indents it. `Shift Tab` will do the reverse. List bullet will change on each indent/unindent. You can disable automatic list bullet switching or choose which bullets to be used, in your settings file. - -## Changes - -* Highlighting current line is now disabled. If you want it back, you can do so in your user settings file which is one of: - - `Packages/User/Markdown.sublime-settings` - - `Packages/User/Markdown (Standard).sublime-settings` - - `Packages/User/MultiMarkdown.sublime-settings` - - If you are using the (immature) focus theme, you have to reenable "highlighting current line"; because, the focus theme relies on that. On the other hand, the theme is likely to be changed a lot or totally replaced by a new feature in the future. - -* Listening to _too many_ users, now the plugin doesn't set any font settings in the defaults. If you were happy with the default font settings, you may want to re-add them to your user settings file of your favorite flavor which is one of: - - `Packages/User/Markdown.sublime-settings` - - `Packages/User/Markdown (Standard).sublime-settings` - - `Packages/User/MultiMarkdown.sublime-settings` - - The font settings for Mac/Linux were: - - "font_face": "Menlo", - "font_options": [ "subpixel_antialias", "no_round", "directwrite"], - - and for Windows: - - "font_face": "Consolas" - -* Bold and italic key bindings (`Ctrl B/I`) are changed due to some conflicts that are reported several time by users. They are now: - - `Super Alt B/I` for OS X - - `Ctrl Shift B/I` for Windows/Linux - -* Setting keys changed. If you used any of these in your user setting files, please reflect these changes to those files. Changes: - * `mde_match_header_hashes` -> `mde.match_header_hashes` - * `mde_keep_centered` -> `mde.keep_centered` - * `mde_distraction_free_mode` -> `mde.distraction_free_mode` - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#109]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/109 diff --git a/messages/2.0.5.md b/messages/2.0.5.md deleted file mode 100644 index 62010915..00000000 --- a/messages/2.0.5.md +++ /dev/null @@ -1,25 +0,0 @@ -# MarkdownEditing 2.0.5 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fix a bug where `Enter` didn't remove _empty_ ordered list item if it's multi-digit. -* Some keybindings (`*`, `_` etc) were irrelevant for code blocks/spans. They are now disabled for inline and block code. -* Headers that don't have a blank line before and after didn't appear in the symbol list. Fixed. -* Improved blockquote extending (via `Enter`): Multilevel blockquotes weren't supported, now they are. - -## New Features - -* At the end of a blockquote line, pressing `Enter` will now automatically extend blockquote. -* If a list item contains a [GFM task][], pressing `Enter` at the end of the line will continue with a new blank task. -* Selecting some text and pressing `>` will now convert it to blockquote. The first and the last line don't have to be fully selected; partial select works, too. -* Fenced code blocks now support C# highlighting (identifier may be one of `cs`, `csharp`, `c#` as in GFM). - -## News - -* We have started a [Tips wiki][tips] for the userbase to share experiences with each other. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[GFM task]: https://help.github.com/articles/github-flavored-markdown -[tips]: https://github.com/SublimeText-Markdown/MarkdownEditing/wiki/Tips diff --git a/messages/2.0.6.md b/messages/2.0.6.md deleted file mode 100644 index fda80f36..00000000 --- a/messages/2.0.6.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkdownEditing 2.0.6 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Header indentation in the symbol list was broken. Fixed. (Fixes [#150][]) - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#150]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/150 diff --git a/messages/2.0.7.md b/messages/2.0.7.md deleted file mode 100644 index d2e9eeb3..00000000 --- a/messages/2.0.7.md +++ /dev/null @@ -1,15 +0,0 @@ -# MarkdownEditing 2.0.7 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fix a Unix bug where pressing `Enter` twice in a list didn't work as expected ([#154][]). - -## New Features - -* Fenced code blocks now supports Lisp. Fixes #156 -* Added command for command palette to convert underlined (SETEXT) headers to hashed (ATX) headers. Works for both selections and whole document. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#154]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/154 diff --git a/messages/2.0.8.md b/messages/2.0.8.md deleted file mode 100644 index a2928c2d..00000000 --- a/messages/2.0.8.md +++ /dev/null @@ -1,17 +0,0 @@ -# MarkdownEditing 2.0.8 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Autopairing `*` had a small bug, fixed. Thanks to [@bordaigorl][] (Fixes [#166][]) -* In lists, only the first list bullet was given a scope. This caused to break custom color schemes. Fixed by [@bordaigorl][]. - -## New Features - -* Block codes are now highlighted in Monokai color scheme. You can see screenshots [here][#168] - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#166]: https://github.com/SublimeText-Markdown/MarkdownEditing/pull/166 -[#168]: https://github.com/SublimeText-Markdown/MarkdownEditing/pull/168 -[@bordaigorl]: https://github.com/bordaigorl diff --git a/messages/2.0.9.md b/messages/2.0.9.md deleted file mode 100644 index 2bb7f601..00000000 --- a/messages/2.0.9.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkdownEditing 2.0.9 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Changes - -* Listening to the users, Monokai color scheme inside code blocks reverted back. If you have things to say, discussion is [here][#168]. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#168]: https://github.com/SublimeText-Markdown/MarkdownEditing/pull/168 diff --git a/messages/2.1.0.md b/messages/2.1.0.md deleted file mode 100644 index ae2f164f..00000000 --- a/messages/2.1.0.md +++ /dev/null @@ -1,24 +0,0 @@ -# MarkdownEditing 2.1.0 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fixed an issue where non-collapsed selections in numbered lists would not get deleted upon pressing `Enter`. -* Fixed an issue where the first list entry marker is colored differently. -* Some minor issues ([#206][], [#207][], [#208][]) -* "Add Missing Link Labels" command was always re-adding labels that contains regex special chars. Fixed. ([#230][]). - -## New Features - -* Indenting or unindenting multiple lines on unnumbered lists will cycle list symbols. -* Color support for [Git Gutter](https://github.com/jisaacks/GitGutter). -* Added lint feature for Markdown files. Press `Ctrl+Shift+M` (`⌘+⇧+M`) or type `MarkdownEditing: Markdown Lint` in the command pallette to try it (by @felixhao28). Check [this document][lint-rules] for the supported rules. -* Fenced code blocks now support Lua highlighting (thanks @amclain !). - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[#206]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/206 -[#207]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/207 -[#208]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/208 -[#230]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues/230 -[lint-rules]: https://github.com/SublimeText-Markdown/MarkdownEditing/blob/master/lint_docs/RULES.md diff --git a/messages/2.1.1.md b/messages/2.1.1.md deleted file mode 100644 index 4e57820e..00000000 --- a/messages/2.1.1.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkdownEditing 2.1.1 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Lists containing list bullet characters (*, -, +) now can be properly indented. -* Some footnotes related commands are fixed. -* <_script_> code blocks now break markdown syntax hightlight less often (but still buggy). - -## New Features - -* "Paste as link"(shortcut: ctrl+super+v(PC)/super+alt+v(MAC)) no longer requires a selection. -* ***Bold and italic*** rendering is now supported. - -P.S. We now have [@felixhao28][] in the project's team. He has already done a -great job with long-waiting bugs and issues in the issue list. Thanks and -welcome Felix! - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[@felixhao28]: https://github.com/felixhao28 diff --git a/messages/2.1.2.md b/messages/2.1.2.md deleted file mode 100644 index 5fe596d9..00000000 --- a/messages/2.1.2.md +++ /dev/null @@ -1,40 +0,0 @@ -# MarkdownEditing 2.1.2 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Many fixes in linter. -* Fixed keep centered feature unintentionally switching on (thanks to @suor). -* Fixed a syntax bug with block level HTML tags. -* HTML ID attributes were appearing in the symbol list, fixed. - -## New Features - -* New markdown files will be automatically renamed to the first title. -* Added a command palette command for switching list bullet types (actually -added in v2.1.1 but didn't get into the changelog). - -## Changes - -* Lint command is renamed to `markdown_lint` (was `lint` before). If you set -custom keybinding for that, you need to update it with the new command name. - -* Hotkey for linting is now removed. The command name for linting is "lint". -You can always add the following configuration to your user keymap file to -enable it. - - ```json - { "keys": ["ctrl+shift+m"], "command": "markdown_lint", "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] - } - ``` - -* Renamed settings key for lint feature to `mde.lint`. If you customized -one of those settings in you user settings file, you have to update `lint` -to `mde.lint`. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.3.md b/messages/2.1.3.md deleted file mode 100644 index 17a0bdf7..00000000 --- a/messages/2.1.3.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkdownEditing 2.1.3 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Removed extra trailing commas from the keymap files. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.4.md b/messages/2.1.4.md deleted file mode 100644 index cf78184f..00000000 --- a/messages/2.1.4.md +++ /dev/null @@ -1,16 +0,0 @@ -# MarkdownEditing 2.1.4 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Various small bug fixes. - -## New Features - -* Automatized syntax highlighting tests (a new feature of ST). -* "Swift" and "scheme" language support for fenced code blocks. -* More liberal fenced code block matching, with unknown language header. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.5.md b/messages/2.1.5.md deleted file mode 100644 index 219017f3..00000000 --- a/messages/2.1.5.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarkdownEditing 2.1.5 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* "Insert References" commands get fixed. Select something and press `alt+ctrl+r` - to try `insert_named_reference` command, and `super+ctrl+shift+r` to try - `insert_numbered_reference`. -* Fix an issue that Sublime Text may freeze when searching in a large project. - -## New Features - -* Four new commands added to command pallete (`Paste as Link`, `Paste as Reference`, - `Insert Named Reference`, `Insert Numbered Reference`). -* New command: `Paste as Inline Link`. -* New command: `Paste as Inline Image`, `Paste as Image`. -* Increment link reference defition on Enter (e.g. `[27]: http://www.example.org`). - -## Changes - -* `Paste As Reference` works differently now. Depending on whether the clipboard - content is a valid URL, `super+ctrl+r` generates a reference on your selection - with clipboard content as URL link or link name. -* `Insert Footnote` (`alt+shift+6`) now uses selected words (if any) as footnote - marker name instead of number. -* Removed `Insert Named Reference` command, you are encouraged to use - `Paste as Reference` instead. -* Space between two link parts will not be highlighted. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.6.md b/messages/2.1.6.md deleted file mode 100644 index 5113f5bc..00000000 --- a/messages/2.1.6.md +++ /dev/null @@ -1,20 +0,0 @@ -# MarkdownEditing 2.1.6 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes -* Creating new numbered list item will retain the indent now. -* Fix regressions that creating references and jumping between a reference and its definition does not scroll the view properly. -* Fix a footnote parsing issue. - -## New Features - -* Support React fenced code (if supported syntax is installed, e.g. babel). -* "mde.auto_increment_ordered_list_number" is a new setting controling whether numberd list should increment number on creating new item. - -## Changes - -* Add license file (MIT). - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.7.md b/messages/2.1.7.md deleted file mode 100644 index adfb1136..00000000 --- a/messages/2.1.7.md +++ /dev/null @@ -1,23 +0,0 @@ -# MarkdownEditing 2.1.7 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fix language definition that causes the first punctuation in list is not recognized. -* Multimarkdown meta now accept names of multiple words. -* Title will not be overwriten if already set - -## New Features - -* Support ````obj code blocks` -* Configure `mde.list_indent_bullets` setting to specify which symbol to use when "Switch List Bullet Type" (command can be found through ctrl/cmd+shift+p). -* A snippet is added on code blocks (```) - -## Changes - -* Putting installation guide to the beginning of Readme -* lineHighlight color is darker. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.8.md b/messages/2.1.8.md deleted file mode 100644 index 4a87a8b3..00000000 --- a/messages/2.1.8.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkdownEditing 2.1.8 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Correctly support SCSS and SASS syntax. -* Links (anchor) in headings are highlighted correctly -* Fix an issue preventing highlighting LESS code block. - -## New Features - -* Support TypeScript syntax: ts/typescript (as well React TypeScript: tsx) - -## Changes - -* (Windows/Linux) Shortcuts for Bold and Italics are changed from `ctrl+shift+b/i` to `alt+b/i` to avoid key binding conflicts with `Build With` and `Incremental Find`. -* (Windows/Linux) Shortcut for `Organize References` has been removed due to conflict with Polish "ś" letter. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.1.9.md b/messages/2.1.9.md deleted file mode 100644 index 68a64aa6..00000000 --- a/messages/2.1.9.md +++ /dev/null @@ -1,19 +0,0 @@ -# MarkdownEditing 2.1.9 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Links (anchor) in headings are highlighted correctly in plain Markdown syntax too -* Fixed some errors when there is no cursor on the current opened document -* Fixed a bug preventing title being set to the first markdown title - -## New Features - -* Add Missing Link Labels command is added back. (Find it in command pallete) -* If markdown title is not present, use the first line as title on new file - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.0.md b/messages/2.2.0.md deleted file mode 100644 index 9fb37a0c..00000000 --- a/messages/2.2.0.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkdownEditing 2.2.0 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* No longer always indent the whole line when you want to replace selection with a tab. -* Fixed an ImportError on some ST2 builds, breaking many MarkdownEditing commands -* Added usage of bullet chars defined by list_indent_bullets in all non-lint handling - -## New Features - -* Added tab stops for inline links and images insertion. (Inspired by [Kristinita's PR](https://github.com/SublimeText-Markdown/MarkdownEditing/pull/391)) - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.1.md b/messages/2.2.1.md deleted file mode 100644 index 28027389..00000000 --- a/messages/2.2.1.md +++ /dev/null @@ -1,52 +0,0 @@ -# MarkdownEditing 2.2.1 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -Just FYI, you can change the color theme of MarkdownEditing. If you are willing to do so, there are [Dark][github 2] and [yellow][github 3] theme available, plus [thirdparty themes](additional-color-themes). See [configuration](configuration) section to learn **how to change the theme**. - -## Bug Fixes - -## New Features - -* `Shift+Tab` is now default key binding to toggle folding in current sections. -* `Ctrl/Command+Shift+Tab` now toggle folding in all sections under headings of same level. FYI, `Ctrl+k,Ctrl+j/0` is a default key binding that unfolds everything. If you use this feature __a lot__ maybe you would want to add your custom key bindings like this: - -```json -{ "keys": ["shift+f12"], "command": "fold_all_sections", "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] -}, -{ "keys": ["shift+f1"], "command": "fold_all_sections", "args": {"target_level": 1}, "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] -}, -{ "keys": ["shift+f2"], "command": "fold_all_sections", "args": {"target_level": 2}, "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] -}, -{ "keys": ["shift+f3"], "command": "fold_all_sections", "args": {"target_level": 3}, "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] -}, -{ "keys": ["shift+f4"], "command": "fold_all_sections", "args": {"target_level": 4}, "context": - [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } - ] -} -``` - -* `Ctrl+Shift+PageUp/Down`, `Command+Shift+PageUp/Down`(Mac) help you navigate to the next or previous heading of the any level. -* `Ctrl+Shift+Alt+PageUp/Down;`, `Command+Ctrl+PageUp/Down`(Mac) help you navigate to the next or previous heading of the same level. - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[github 2]: https://raw.github.com/SublimeText-Markdown/MarkdownEditing/master/screenshots/dark.png -[github 3]: https://raw.github.com/SublimeText-Markdown/MarkdownEditing/master/screenshots/yellow.png -[additional-color-themes]: https://github.com/SublimeText-Markdown/MarkdownEditing/tree/master#additional-color-themes -[configuration]: https://github.com/SublimeText-Markdown/MarkdownEditing/tree/master#configuration \ No newline at end of file diff --git a/messages/2.2.10.md b/messages/2.2.10.md deleted file mode 100644 index 1a46a4c5..00000000 --- a/messages/2.2.10.md +++ /dev/null @@ -1,46 +0,0 @@ -# MarkdownEditing 2.2.10 Changelog - -## Bug Fixes - -* fix color scheme chooser not being displayed after install - -## New Features - -* none - -## Changes - -* none - -## 3.0.0 Announcement - -A major release is in development, which fixes most of open issues -and comes a long with various improvements. - -To learn more, visit https://sublimetext-markdown.github.io/MarkdownEditing - -### Breaking Changes - -It contains breaking changes with regards to settings and key bindings -which need manual work to cleanup existing settings from you. - -* Some information about settings can be found at - https://sublimetext-markdown.github.io/MarkdownEditing/config - -* Renamed commands are listed at - https://sublimetext-markdown.github.io/MarkdownEditing/troubleshooting - -If you miss important information feel free to open and [issue][issues] or PR. - -### Opt-in to Pre-Releases - -There's probably still a long route to go, but if you are interested -in or provide feedback about introduced changes -you can opt-in to development builts by adding the following setting -to Package Control.sublime-settings. - -``` -"install_prereleases": ["MarkdownEditing"] -``` - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.2.md b/messages/2.2.2.md deleted file mode 100644 index 3a740ba9..00000000 --- a/messages/2.2.2.md +++ /dev/null @@ -1,17 +0,0 @@ -# MarkdownEditing 2.2.2 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fix a conflict between unindenting and folding section -* Fix a bug that 'Switch List Bullet Type' command does not work on ordered lists. - -## New Features - -* ArcDark theme has been added by [@madeindjs](https://github.com/madeindjs) (take a peek at https://github.com/SublimeText-Markdown/MarkdownEditing/pull/428). To use it, try `"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-ArcDark.tmTheme"` in your MDE user configuration. - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.3.md b/messages/2.2.3.md deleted file mode 100644 index e24dc2a9..00000000 --- a/messages/2.2.3.md +++ /dev/null @@ -1,56 +0,0 @@ -# MarkdownEditing 2.2.3 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Link references commands (Jump/Delete/Organize) now work correctly with no-link `[link text]` style and ignore cases. -* `[link text]` is now highlighted correctly. -* Folding correctly ignores fake titles in code blocks. - -## New Features - -* You can now disable some of the key bindings through configuration. For example, if you want to disable the "shift+tab" => "fold current section" key binding, add `"mde.keymap_disable.fold_section": true` to your user config. For a full list of such key bindings, check the list below. -* Organize References command now sorts references by referencing order rather than alphebetic order. -* Code block highlight for clojure. -* You can use `MarkdownEditing: Change color scheme...` command in command palette to preview and change the color scheme you are using for markdown. -* Added `MDE: (Un)Fold Section` and `MDE: Jump Reference` to context menu (only appear if applicable based on the cursor's location). - -### Configurable Key Bindings - -```json -{ - // Jump between link/image/footnote reference and definition - // Default keys: (OSX)super+ctrl+shift+l (Linux/Win)ctrl+alt+g - "mde.keymap_disable.reference_jump": false, - // Add a new link - // Default keys: (OSX)super+alt+r (Linux/Win)ctrl+super+r - "mde.keymap_disable.reference_new_reference": false, - // Add a new inline link - // Default keys: (OSX)super+alt+v (Linux/Win)ctrl+super+v - "mde.keymap_disable.reference_new_inline_link": false, - // Add a new inline image - // Default keys: (OSX/Linux/Win)super+shift+k - "mde.keymap_disable.reference_new_inline_image": false, - // Add a new footnote - // Default keys: (OSX/Linux/Win)alt+shift+6 - "mde.keymap_disable.reference_new_footnote": false, - // Fold current section - // Default keys: (OSX/Linux/Win)shift+tab - "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, - // 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, - // Jump to the previous heading (any level/same or higher level) - // Default keys: (OSX)super+ctrl/shift+pageup (Linux/Win)ctrl+shift(+alt)+pageup - "mde.keymap_disable.goto_previous_heading": false -} -``` - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.4.md b/messages/2.2.4.md deleted file mode 100644 index a8dd1b92..00000000 --- a/messages/2.2.4.md +++ /dev/null @@ -1,26 +0,0 @@ -# MarkdownEditing 2.2.4 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fix an issue that occationally prevents creating link references with command. -* Fix an issue that breaks navigating through headers while front matter is present. - -## New Features - -* Latex math expressions are highlighted now: - - $\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).$ -* Front matter (yaml, coffee, json) highlight. -* Go Programming Language highlight in code blocks. -* Kotlin Programming Language highlight in code blocks (requires Kotlin package). -* Convert between inline links and references. - - Command: MarkdownEditing: Convert all inline links to references - - Command: MarkdownEditing: Convert inline link to references - + Only appear if cursor is on an inline link - + Also appear in context menu - -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.5.md b/messages/2.2.5.md deleted file mode 100644 index bac26274..00000000 --- a/messages/2.2.5.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkdownEditing 2.2.5 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* YAML front matter enclosed by "..." is now correctly recognized by syntax parser. -* Fix an issue with Sublime Text 3 updating to Build 3144 - -## New Features - -* Added Reason/OCmal syntax support (thanks to @gandulio) - -## Changes - -## Note - -When you notice any undesired behavior introduced by the latest update, your feedback is always welcome in our [issue page](https://github.com/SublimeText-Markdown/MarkdownEditing/issues). However before it's fixed, you can rollback to [an earlier version](https://github.com/SublimeText-Markdown/MarkdownEditing/releases). Find the desired version and download the zip file, then follow [manual installation guide](#manual-installation) - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.6.md b/messages/2.2.6.md deleted file mode 100644 index 87ed0398..00000000 --- a/messages/2.2.6.md +++ /dev/null @@ -1,63 +0,0 @@ -# MarkdownEditing 2.2.6 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Call for Maintainers! - -MarkdownEditing is an open-sourced and free project aiming to improve markdown experience on Sublime Text 3. If you like this package and want to help it move forward, please check below [Call for Maintainers](#call-for-maintainers) section. - -## Bug Fixes - -* Save dialog now uses proper file extensions on Markdown (Standard) and MultiMarkdown. - -## New Features - -* Haskell syntax is supported in code blocks. -* Wiki features are added (see below _Wiki features_), credits to [Dave Ellis](https://github.com/dave-ellis). -* MDE now supports [markdownlint](https://github.com/markdownlint/markdownlint) package for linting. To use this, you need to install markdownlint first (it requires Ruby). Then use `MarkdownEditing: Run markdownlint`. markdownlint is highly configurable, check [its document](https://github.com/markdownlint/markdownlint/blob/master/docs/configuration.md) for configuration options. It is also always possible to use [ST Build System](http://docs.sublimetext.info/en/latest/file_processing/build_systems.html) to automate linting, rendering to HTML or PDF etc for advanced users. -* Github style comment `` is now supported in Markdown GFM. - -## Changes - -* (Windows/Linux) Keybindings for `New Inline Link` and `New Reference` are changed to `Ctrl+Alt+v` and `Ctrl+Alt+r`, from `Ctrl+Super+v` and `Ctrl+Super+r`, due to the conflict with Win10 `Open Shoulder Tap` shortcut. Keybindings on Mac are not affected. -* Background color of http links in the default color is disabled, due to being distracting. - -## (New) Wiki Features - -Wiki features are intended for wiki writers. - -Wiki links are defined by surrounding a (wiki) word with double square brackets, for example: - - [[SampleWikiPage]] - -The user can `open` wiki page using a sublime command. This will search the current open file's directory (and sub-directories) for a file with a matching name and a markdown extension. For example, opening the previous wiki link -will look for and open a file named: - - SampleWikiPage.md - -Note that, if the wiki page does *not* yet exist, if will be created with a header matching the page name. However the file will only actually be created on the file system, when it is saved by the user. - -The user can `list back links` and of course to open them. Back links are pages that reference the current page. This allows pages to be tied together into a personal wiki. A common technique is to define *tag* wiki pages and to list any tags for a page as references to the tag pages at the bottom of the page, for example: - - [[TagSyntax]] [[TagDev]] [[TagPython]] - -This allows the user to list all pages with a specific tag, by opening the tag page and list all back links. - -Journal wiki pages are also supported. A journal page is just a wiki page with a name matching the current date. - -Lastly the command to open the *home* page is provided, where the home page is just a wiki page named `HomePage`. - -For more info on wiki features, please refer to this pull request: https://github.com/SublimeText-Markdown/MarkdownEditing/pull/486 - -## Call for Maintainers - -This project was created by Brett Terpstra back in 2012. After a few transfers and now the maintainance is majorly headed by Felix Hao (me). However given the recent changes in my career I won't be able to devote as much time to MDE as I did for the past three years. So here is a call for volunteer maintainers to keep this project going forward. - -### Where to start? - -At this time of writing this message, there are 74 open issues. It would be great if we can cut the number down to less than 50 at all time. Sometimes an issue is a misuse, but more often it is a bug or bad design. - -The project source is hosted on [Github](https://github.com/SublimeText-Markdown/MarkdownEditing). `CONTRIBUTING.md` has some general guides worth checking out too. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.7.md b/messages/2.2.7.md deleted file mode 100644 index 1f1f8f3a..00000000 --- a/messages/2.2.7.md +++ /dev/null @@ -1,40 +0,0 @@ -# MarkdownEditing 2.2.7 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Fixed an issue in setting files that caused failure on ST2. -* Fixes many issues regarding to "unclosed code block" like this (notice `', select the whole URL, then press '<'. -* Support highlight with Rust language. -* Enables styling of ">" quotes when inside either numbered and un-numbered lists. - -## Changes - -* As stated previously, you need to upgrade to newest Sublime Text 3 stable build (3170) for code blocks to work. -* **Wiki**: when creating a new wiki page, a template file configured by "mde.wikilinks.templates" setting will be used if possible. The template file currently supports "$title" placeholder. - -## Note - -There is a known issue with Sublime Text Dev Build that causes highlight in some code blocks (notably JavaScript and JSON) not closing as intended. I recommend using stable version for now. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues -[mde226]: https://github.com/SublimeText-Markdown/MarkdownEditing/releases/tag/2.2.6 \ No newline at end of file diff --git a/messages/2.2.8.md b/messages/2.2.8.md deleted file mode 100644 index c6eb0603..00000000 --- a/messages/2.2.8.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkdownEditing 2.2.8 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -* Some theme display bugs are fixed. - - Strikethroughs are highlighted properly. - - Link texts are highlighted properly. - -## New Features - -* Tab/shift+tab on the beginning of the line of a list item will correctly indent/unindent that item. -* Support AutoHotkey AHK fenced code (if supported syntax is installed) - -## Changes - -* Default four color schemes are renamed from '.tmTheme' extension to '.sublime-color-scheme'. Sublime Text seems to be smart enough to redirect .tmTheme files to .sublime-color-scheme files in settings if possible. - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/2.2.9.md b/messages/2.2.9.md deleted file mode 100644 index 2c961e25..00000000 --- a/messages/2.2.9.md +++ /dev/null @@ -1,13 +0,0 @@ -# MarkdownEditing 2.2.9 Changelog - -Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of -feedback you can use [GitHub issues][issues]. - -## Bug Fixes - -- Revert 2.2.8 release, since it causes issues. - -## New Features -## Changes - -[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/messages/3.4.0.md b/messages/3.4.0.md new file mode 100644 index 00000000..31b1dc49 --- /dev/null +++ b/messages/3.4.0.md @@ -0,0 +1,21 @@ +# MarkdownEditing 3.4.0 Changelog + +Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of +feedback you can use [GitHub issues][issues]. + +## Bug Fixes + +- fix wiki reference creation between words (#793) +- exclude wildcards `?` and `*` from wiki links +- fix "set unsaved view name" functionality to cooperate with ST's builtin one +- fix emphasis (bold/italic) highlighting +- fix scope of mermaid fenced code blocks + +## New Features + +- add support for journal files with date and time (#792) +- add support for merge conflict marker highlighting + +## Changes + +[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/plugins/decorators.py b/plugins/decorators.py new file mode 100644 index 00000000..7f6c5d48 --- /dev/null +++ b/plugins/decorators.py @@ -0,0 +1,50 @@ +import sublime + +from functools import partial, wraps +from time import time as now + + +def debounced(delay_in_ms, sync=False): + """Delay calls to event hooks until they weren't triggered for n ms. + + Performs view-specific tracking and is best suited for the + `on_modified` and `on_selection_modified` methods + and their `_async` variants. + The `view` is taken from the first argument for `EventListener`s + and from the instance for `ViewEventListener`s. + + Calls are only made when the `view` is still "valid" according to ST's API, + so it's not necessary to check it in the wrapped function. + """ + + # We assume that locking is not necessary because each function will be called + # from either the ui or the async thread only. + set_timeout = sublime.set_timeout if sync else sublime.set_timeout_async + + def decorator(func): + call_at = {} + + def _debounced_callback(view, callback): + if not view.is_valid(): + del call_at[view.view_id] + return + diff = call_at[view.view_id] - now() * 1000 + if diff > 0: + set_timeout(partial(_debounced_callback, view, callback), diff) + else: + del call_at[view.view_id] + callback() + + @wraps(func) + def wrapper(self, *args, **kwargs): + view = self.view if hasattr(self, "view") else args[0] + pending = view.view_id in call_at + call_at[view.view_id] = now() * 1000 + delay_in_ms + if pending: + return + callback = partial(func, self, *args, **kwargs) + set_timeout(partial(_debounced_callback, view, callback), delay_in_ms) + + return wrapper + + return decorator diff --git a/plugins/footnotes.py b/plugins/footnotes.py index 35d7a89e..420c3c4b 100644 --- a/plugins/footnotes.py +++ b/plugins/footnotes.py @@ -193,7 +193,7 @@ def run(self, edit): if r not in keys: keys.append(r) - for (key, item) in defs.items(): + for key, item in defs.items(): fnend = self.view.find(r"(\s*\Z|\n\s*\n(?!\ {4,}))", item.end()) fnreg = sublime.Region(item.begin(), fnend.end()) notes[key] = self.view.substr(fnreg).strip() diff --git a/plugins/headings/common.py b/plugins/headings/common.py index d23249e2..248dbafd 100644 --- a/plugins/headings/common.py +++ b/plugins/headings/common.py @@ -1,6 +1,9 @@ import re +import unicodedata + import sublime +from ..decorators import debounced from ..view import MdeViewEventListener HEADINGS_RE = re.compile( @@ -54,15 +57,42 @@ class MdeUnsavedViewNameSetter(MdeViewEventListener): This view event listener prints the first heading as tab title of unsaved documents. """ - MAX_NAME = 50 - + @debounced(50, sync=True) def on_modified(self): - if self.view.file_name() is not None or not self.view.settings().get( - "set_unsaved_view_name", True - ): + if self.view.file_name() or self.view.is_loading(): + return + + view_settings = self.view.settings() + if not view_settings.get("set_unsaved_view_name", True): + return + + cur_name = view_settings.get("mde_auto_name") + view_name = self.view.name() + + # Name has been explicitly set, don't override it + if not cur_name and view_name: + return + + # Name has been explicitly changed, don't override it + if cur_name and cur_name != view_name: + view_settings.erase("mde_auto_name") + return + + # Don't set the names on widgets, it'll just trigger spurious + # on_modified callbacks + if view_settings.get("is_widget"): return name = first_heading_text(self.view) - if len(name) > self.MAX_NAME: - name = name[: self.MAX_NAME] + "…" + if len(name) > 50: + name = name[:50] + "…" + + # Filter non-printable characters. Without this the save dialog on + # windows fails to open. + first_line = "".join(c for c in name if unicodedata.category(c)[0] != "C") + self.view.set_name(name) + view_settings.set("mde_auto_name", name) + + # make sure ST's default auto-namer keeps quite + view_settings.erase("auto_name") diff --git a/plugins/references.py b/plugins/references.py index 76cced0e..b462fc95 100644 --- a/plugins/references.py +++ b/plugins/references.py @@ -15,6 +15,7 @@ MdeConvertInlineLinkToReferenceCommand MdeConvertInlineLinksToReferencesCommand """ + import sublime import re import operator @@ -571,9 +572,9 @@ def run(self, edit): sel.add(line_reg) sorting_funcs = { - "reference_order": lambda x: reference_order[x[0].lower()] - if x[0].lower() in reference_order - else 9999, + "reference_order": lambda x: ( + reference_order[x[0].lower()] if x[0].lower() in reference_order else 9999 + ), "alphabetical": lambda x: x[0].lower(), "numeric": lambda x: [ int(p) if p.isnumeric() else p for p in re.split(r"[ _.-]", x[0].lower()) diff --git a/plugins/wiki_page.py b/plugins/wiki_page.py index 80f13c3c..3fd209c3 100644 --- a/plugins/wiki_page.py +++ b/plugins/wiki_page.py @@ -5,7 +5,7 @@ import sublime -from datetime import date +from datetime import datetime from .logging import logger from .view import MdeTextCommand @@ -56,9 +56,8 @@ def run(self, edit): class MdeOpenJournalCommand(MdeTextCommand): def run(self, edit): - today = date.today() date_format = self.view.settings().get("mde.journal.dateformat", DEFAULT_DATE_FORMAT) - name = today.strftime(date_format) + name = datetime.now().strftime(date_format) wiki_page = WikiPage(self.view) wiki_page.select_page(name) @@ -97,7 +96,6 @@ def get_selected(self): class MdePrepareFromTemplateCommand(MdeTextCommand): - DEFAULT_PAGE_TEMPLATE = "templates/PageTemplate.md" PRESET_TEMPLATE_TEXT = "# $title\n\n" @@ -296,17 +294,30 @@ def list_dir_tree(self, directory): yield dir, dirnames, files def select_word_at_cursor(self): - word_region = None - - selection = self.view.sel() - for region in selection: - word_region = self.view.word(region) - if not word_region.empty(): - selection.clear() - selection.add(word_region) - return word_region + sels = self.view.sel() + if not sels: + return None + + # return non-empty selection + sel = sels[0] + if not sel.empty(): + return sel + + # return empty selection if surrounded by whitespace + reg = sublime.Region(sel.begin() - 1, sel.end()) + if all(c in " \t\n" for c in self.view.substr(reg)): + return sel + + # expand selection to word boundaries + reg = self.view.expand_by_class( + sel, classes=sublime.CLASS_WORD_START | sublime.CLASS_WORD_END, separators=" \t\n?*" + ) + if not reg.empty(): + sels.clear() + sels.add(reg) + return reg - return word_region + return sel def show_quick_list(self, file_list): self.file_list = file_list diff --git a/syntaxes/Markdown.sublime-settings b/syntaxes/Markdown.sublime-settings index acf72111..4a42c545 100644 --- a/syntaxes/Markdown.sublime-settings +++ b/syntaxes/Markdown.sublime-settings @@ -1,3 +1,6 @@ { + // Disable ST's default view name assigner + "set_unsaved_view_name_for_syntax": false, + "trim_trailing_white_space_on_save": "none" } diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index ed539b3f..82374ec6 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -421,6 +421,9 @@ variables: # not followed by Unicode whitespace and followed by a Unicode punctuation character no_space_but_punct: (?=[[^\s*]&&\p{P}]) + # BOL for ST specific newline treatment or unicode whitespace + wspace: (?:^|\s+) + ############################################################################## contexts: @@ -476,6 +479,7 @@ contexts: 1: punctuation.section.frontmatter.end.markdown markdown: + - include: merge-conflict-markers - include: indented-code-blocks - include: thematic-breaks - include: block-quotes @@ -495,6 +499,26 @@ contexts: # The content may diverge from list block content in future. - include: list-block-content +###[ MERGE CONFLICT MARKERS ]################################################## + + merge-conflict-markers: + # see also: Diff.sublime-syntax#conflict-markers + - match: ^(<{7})(?:\s+(\S.*?))?$\n? + scope: meta.block.conflict.begin.diff + captures: + 1: punctuation.section.block.begin.diff + 2: entity.name.section.diff + - match: ^(>{7})(?:\s+(\S.*?))?$\n? + scope: meta.block.conflict.end.diff + captures: + 1: punctuation.section.block.end.diff + 2: entity.name.section.diff + - match: ^(\|{7}|={7})(?:\s+(\S.*?))?$\n? + scope: meta.block.conflict.separator.diff + captures: + 1: punctuation.section.block.diff + 2: entity.name.section.diff + ###[ CONTAINER BLOCKS: BLOCK QUOTES ]######################################### block-quotes: @@ -861,6 +885,7 @@ contexts: pop: 1 list-block-content: + - include: merge-conflict-markers - include: fenced-code-blocks - include: fenced-div-blocks - include: html-blocks @@ -2645,11 +2670,10 @@ contexts: 6: comment.line.infostring.markdown 7: meta.fold.code-fence.begin.markdown embed: scope:source.mermaid - embed_scope: - source.mermaid + meta.code-fence.body.markdown-gfm markup.raw.code-fence.mermaid.markdown-gfm - source.mermaid.embedded.markdown-gfm + source.mermaid escape: '{{fenced_code_block_escape}}' escape_captures: 0: meta.code-fence.definition.end.markdown-gfm @@ -3376,7 +3400,7 @@ contexts: captures: 1: punctuation.definition.raw.begin.markdown 2: punctuation.definition.raw.end.markdown - - match: \`+ # consume remainers + - match: \`+ # consume remainders table-cell-emphasis: - include: emphasis @@ -3437,6 +3461,7 @@ contexts: - include: link-ref markups: + - include: merge-conflict-markers # Markdown will convert this for us. We match it so that the # HTML grammar will not mark it up as invalid. - match: '[<>](-+|=+)[<>]?' @@ -3488,7 +3513,7 @@ contexts: - match: '{{bold_asterisk_begin}}' scope: punctuation.definition.bold.begin.markdown push: bold-asterisk - - match: \b(__)(_)(?=\S)(?!_) + - match: \b(__)(_)(?![_\s]) captures: 1: punctuation.definition.bold.begin.markdown 2: markup.italic.markdown punctuation.definition.italic.begin.markdown @@ -3499,14 +3524,9 @@ contexts: bold-asterisk: - meta_scope: markup.bold.markdown - - match: |- - (?x) - [ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+\*\*+ # whitespace followed by 2 or more is also not applicable - | ^\*\* # emphasis can't be closed at the start of the line - - match: (?:_)?(\*\*) - captures: - 1: punctuation.definition.bold.end.markdown + - match: '{{wspace}}\*{2,}' + - match: \*\* + scope: punctuation.definition.bold.end.markdown pop: 1 # Consume the underscore that has no corresponding underscore before the closing bold # punctuation on the same line, as it won't be treated as italic by CommonMark @@ -3515,14 +3535,9 @@ contexts: bold-underscore: - meta_scope: markup.bold.markdown - - match: |- - (?x) - [ \t]*_{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+__+ # whitespace followed by 2 or more is also not applicable - | ^__ # emphasis can't be closed at the start of the line - - match: (?:\*)?(__\b) - captures: - 1: punctuation.definition.bold.end.markdown + - match: '{{wspace}}_{2,}' + - match: __(?=_*\b) + scope: punctuation.definition.bold.end.markdown pop: 1 # Consume the asterisk that has no corresponding asterisk before the closing bold # punctuation on the same line, as it won't be treated as italic by CommonMark @@ -3532,11 +3547,7 @@ contexts: bold-italic-asterisk: - meta_scope: markup.bold.markdown - meta_content_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+\*(?!\*) # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^\*(?!\*) # emphasis can't be closed at the start of the line + - match: '{{wspace}}\*+' - match: (\*)(\*\*) captures: 1: markup.italic.markdown punctuation.definition.italic.end.markdown @@ -3545,7 +3556,7 @@ contexts: - match: \*\* scope: markup.italic.markdown punctuation.definition.bold.end.markdown set: italic-after-bold-italic-asterisk - - match: \* + - match: \*(?!\*[^\s*]) scope: markup.italic.markdown punctuation.definition.italic.end.markdown set: bold-after-bold-italic-asterisk - include: emphasis-common @@ -3554,11 +3565,7 @@ contexts: bold-after-bold-italic-asterisk: - meta_content_scope: markup.bold.markdown - - match: |- - (?x) - [ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+\*\*+ # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^\*\* # emphasis can't be closed at the start of the line + - match: '{{wspace}}\*{3,}' - match: \*\* scope: markup.bold.markdown punctuation.definition.bold.end.markdown pop: 1 @@ -3566,12 +3573,8 @@ contexts: italic-after-bold-italic-asterisk: - meta_content_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+\*\*+ # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^\*\* # emphasis can't be closed at the start of the line - - match: \* + - match: '{{wspace}}\*{3,}' + - match: \*(?!\*[^\s*]) scope: markup.italic.markdown punctuation.definition.italic.end.markdown pop: 1 - include: italic-common @@ -3579,46 +3582,34 @@ contexts: bold-italic-underscore: - meta_scope: markup.bold.markdown - meta_content_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*_{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+_(?!_) # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^_(?!_) # emphasis can't be closed at the start of the line - - match: (_)(__)\b + - match: '{{wspace}}_+' + - match: (_)(__)(?=_*\b) captures: 1: markup.italic.markdown punctuation.definition.italic.end.markdown 2: punctuation.definition.bold.end.markdown pop: 1 - - match: _\b - scope: markup.italic.markdown punctuation.definition.italic.end.markdown - set: bold-after-bold-italic-underscore - match: __\b scope: markup.italic.markdown punctuation.definition.bold.end.markdown set: italic-after-bold-italic-underscore + - match: _\b + scope: markup.italic.markdown punctuation.definition.italic.end.markdown + set: bold-after-bold-italic-underscore - include: emphasis-common - include: highlight - include: strikethrough bold-after-bold-italic-underscore: - meta_content_scope: markup.bold.markdown - - match: |- - (?x) - [ \t]*_{3,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+__+ # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^__ # emphasis can't be closed at the start of the line - - match: __\b + - match: '{{wspace}}_{3,}' + - match: __(?=_*\b) scope: markup.bold.markdown punctuation.definition.bold.end.markdown pop: 1 - include: bold-common italic-after-bold-italic-underscore: - meta_content_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*_{3,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+__+ # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^__ # emphasis can't be closed at the start of the line - - match: _\b + - match: '{{wspace}}_{3,}' + - match: _(?=_*\b) scope: markup.italic.markdown punctuation.definition.italic.end.markdown pop: 1 - include: italic-common @@ -3640,25 +3631,16 @@ contexts: italic-asterisk: - meta_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+\*(?!\*) # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^\*(?!\*) # emphasis can't be closed at the start of the line - - match: \*(?!\*[^*]) + - match: '{{wspace}}\*(?!\*)' + - match: \*(?!\*[^\s*]) scope: punctuation.definition.italic.end.markdown pop: 1 - - match: \*+ - include: italic-common italic-underscore: - meta_scope: markup.italic.markdown - - match: |- - (?x) - [ \t]*_{4,} # if there are more than 3 its not applicable to be bold or italic - | [ \t]+_(?!_) # whitespace followed by 1 is also not applicable (but whitespace followed by 2 could be bold punctuation) - | ^_(?!_) # emphasis can't be closed at the start of the line - - match: _\b + - match: '{{wspace}}_(?!_)' + - match: _(?=_*\b) scope: punctuation.definition.italic.end.markdown pop: 1 - include: italic-common diff --git a/syntaxes/MultiMarkdown.sublime-settings b/syntaxes/MultiMarkdown.sublime-settings index acf72111..4a42c545 100644 --- a/syntaxes/MultiMarkdown.sublime-settings +++ b/syntaxes/MultiMarkdown.sublime-settings @@ -1,3 +1,6 @@ { + // Disable ST's default view name assigner + "set_unsaved_view_name_for_syntax": false, + "trim_trailing_white_space_on_save": "none" } diff --git a/tests/requirements.txt b/tests/requirements.txt index 3fe96dde..8df087a4 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,10 +1 @@ -mccabe == 0.6.1 ; python_version == '3.3' -pycodestyle == 2.3.1 ; python_version == '3.3' -pyflakes == 1.6.0 ; python_version == '3.3' -flake8 == 3.5.0 ; python_version == '3.3' -mccabe == 0.6.1 ; python_version >= '3.8' -pycodestyle == 2.8.0 ; python_version >= '3.8' -pyflakes == 2.4.0 ; python_version >= '3.8' -flake8 == 4.0.1 ; python_version >= '3.8' -click == 8.0.2 ; python_version >= '3.8' -black == 22.3.0 ; python_version >= '3.8' +black == 25.1.0 ; python_version >= '3.8' diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index 0a6d3f27..627754cc 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -1052,11 +1052,11 @@ this must not be bold italic*** | ^^^ - entity.name.section | ^^ punctuation.definition.heading.end.markdown -# Headding with tag +# Heading with tag | <- markup.heading.1.markdown punctuation.definition.heading.begin.markdown -|^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.heading.1.markdown -| ^^^ meta.tag -| ^^^^ meta.tag +|^^^^^^^^^^^^^^^^^^^^^^^^^ markup.heading.1.markdown +| ^^^ meta.tag +| ^^^^ meta.tag # TEST: SETEXT HEADINGS ####################################################### @@ -1995,7 +1995,7 @@ var_dump(expression); ```python |^^^^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup |^^ punctuation.definition.raw.code-fence.begin | ^^^^^^ constant.other.language-name def function(): @@ -2010,7 +2010,7 @@ unclosed_paren = ( ```regex |^^^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup (?x) \s+ | <- meta.code-fence.body.markdown-gfm markup.raw.code-fence.regexp.markdown-gfm source.regexp @@ -2021,7 +2021,7 @@ unclosed_paren = ( ```scala |^^^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup | <- meta.code-fence.body.markdown-gfm markup.raw.code-fence.scala.markdown-gfm source.scala ``` @@ -2093,7 +2093,7 @@ bar ```sql |^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup |^^ punctuation.definition.raw.code-fence.begin.markdown | ^^^ constant.other.language-name SELECT TOP 10 * @@ -2120,7 +2120,7 @@ declare type foo = 'bar' ```xml |^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup |^^ punctuation.definition.raw.code-fence.begin.markdown | ^^^ constant.other.language-name @@ -2136,7 +2136,7 @@ declare type foo = 'bar' ```jsx:file.jsx |^^^^^^^^^^^^^^ meta.code-fence.definition.begin - meta.fold - markup -| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - merkup +| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin - markup |^^ punctuation.definition.raw.code-fence.begin.markdown | ^^^ constant.other.language-name.markdown | ^^^^^^^^^ comment.line.infostring.markdown @@ -4447,7 +4447,7 @@ second line ## https://custom-tests/block-quotes#emphasis -> Blcok quotes support markup, +> Block quotes support markup, > like *italics*, **bold**, ***bold italic*** and ~~strikethrough~~. |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.quote.markdown | ^^^^^^^^^ markup.italic.markdown @@ -5456,7 +5456,7 @@ global heading

| <- markup.list.unnumbered.markdown meta.disable-markdown meta.tag |^^ markup.list.unnumbered.markdown meta.disable-markdown meta.tag - *no-markodwn* + *no-markdown* |^^^^^^^^^^^^^^^ markup.list.unnumbered.markdown meta.disable-markdown - markup.italic

- not a list item @@ -6746,6 +6746,16 @@ _foo __bar__ baz_ | ^ punctuation.definition.italic.end.markdown | ^ - markup +*foo **bar** baz* +| <- markup.italic.markdown punctuation.definition.italic.begin.markdown +|^^^^ markup.italic.markdown - markup markup +| ^^ punctuation.definition.bold.begin.markdown +| ^^^^^^^ markup.italic.markdown markup.bold.markdown +| ^^ punctuation.definition.bold.end.markdown +| ^^^^^ markup.italic.markdown - markup markup +| ^ punctuation.definition.italic.end.markdown +| ^ - markup + ## https://spec.commonmark.org/0.30/#example-418 *foo [*bar*](/url)* @@ -6835,6 +6845,17 @@ __foo _bar_ baz__ | ^ punctuation.definition.bold.end.markdown | ^ - markup +**foo *bar* baz** +| <- markup.bold.markdown punctuation.definition.bold.begin.markdown +|^^^^^ markup.bold.markdown - markup markup +|^ punctuation.definition.bold.begin.markdown +| ^ punctuation.definition.italic.begin.markdown +| ^^^^^ markup.bold.markdown markup.italic.markdown +| ^ punctuation.definition.italic.end.markdown +| ^^^^^^ markup.bold.markdown - markup markup +| ^ punctuation.definition.bold.end.markdown +| ^ - markup + ## https://spec.commonmark.org/0.30/#example-432 **foo [*bar*](/url)** @@ -6923,8 +6944,9 @@ foo **_** ## https://spec.commonmark.org/0.30/#example-442 *foo** - -> Note: Needs ST4's branching to get it right! +|^^^^ markup.italic.markdown +| ^ punctuation.definition.italic.end.markdown +| ^ - markup.italic - punctuation ## https://spec.commonmark.org/0.30/#example-443 @@ -6950,8 +6972,9 @@ foo **_** ## https://spec.commonmark.org/0.30/#example-446 *foo**** - -> Note: Needs ST4's branching to get it right! +|^^^^ markup.italic.markdown +| ^ punctuation.definition.italic.end.markdown +| ^^^ - markup.italic - punctuation ## https://spec.commonmark.org/0.30/#example-447 @@ -7053,16 +7076,25 @@ _more `tests_` here_ | ^^^^^^^^ markup.raw.inline | ^ punctuation.definition.italic.end +_more `tests_` here__ +| ^ - punctuation + __more `tests__` here__ | <- punctuation.definition.bold.begin | ^^^^^^^^^ markup.raw.inline | ^^ punctuation.definition.bold.end +__more `tests__` here___ +| ^ - punctuation + **more `tests__` here** | <- punctuation.definition.bold.begin | ^^^^^^^^^ markup.raw.inline | ^^ punctuation.definition.bold.end +**more `tests__` here*** +| ^ - punctuation + **more `tests**` here** | <- punctuation.definition.bold.begin | ^^^^^^^^^ markup.raw.inline @@ -7070,9 +7102,17 @@ __more `tests__` here__ *more `tests__` here** | <- punctuation.definition.italic.begin -| ^^ - punctuation +| ^ punctuation.definition.italic.end +| ^ - punctuation abc* -| ^ punctuation.definition.italic.end +| ^ - punctuation + +_more `tests__` here__ +| <- punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^ - punctuation +abc_ +| ^ - punctuation This is ***bold italic*** | ^^^^^^^^^^^^^^^^^ markup.bold @@ -7082,6 +7122,114 @@ This is ***bold italic*** | ^ punctuation.definition.italic.end | ^^ punctuation.definition.bold.end +This is ***bold*italic*** +| ^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^ markup.italic +| ^ punctuation.definition.italic.end +| ^^^^^^^^^ - markup.italic +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - punctuation + +This is ***bold* italic*** +| ^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^ markup.italic +| ^ punctuation.definition.italic.end +| ^^^^^^^^^ - markup.italic +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - punctuation + +This is ***bold *italic*** +| ^^^^^^^^^^^^^^^^^^ markup.bold, markup.italic +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - punctuation + +This is ***bold * italic*** +| ^^^^^^^^^^^^^^^^^^^ markup.bold, markup.italic +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - punctuation + +This is ***bold**italic*** +| ^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^ markup.italic +| ^^ punctuation.definition.bold.end +| ^^^^^^^^ - markup.bold +| ^ punctuation.definition.italic.end +| ^^ - markup.italic - punctuation + +This is ***bold** italic*** +| ^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^^ markup.italic +| ^^ punctuation.definition.bold.end +| ^^^^^^^^^ - markup.bold +| ^ punctuation.definition.italic.end +| ^^ - markup.italic - punctuation + +This is ***bold **italic*** +| ^^^^^^^^^^^^^^^^^^^ markup.bold, markup.italic +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ***bold ** italic*** +| ^^^^^^^^^^^^^^^^^^^^ markup.bold, markup.italic +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ***bold ***italic*** +| ^^^^^^^^^^^^^^^^^^^^ markup.bold, markup.italic +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ***bold italic** **bold italic*** +| ^^^^^^^^^^^^^^^^ markup.bold.markdown +| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.italic.markdown +| ^ markup.italic - markup.bold +| ^^^^^^^^^^^^^^^ markup.bold.markdown +| ^ - markup.bold +| ^ - markup.bold - markup.italic - punctuation +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^ punctuation.definition.bold.end +| ^^ punctuation.definition.bold.begin +| ^^ punctuation.definition.bold.end +| ^ punctuation.definition.italic.end + +This is ***bold italic* *bold italic*** +| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.bold.markdown +| ^^^^^^^^^^^^^ markup.italic +| ^ - markup.italic +| ^^^^^^^^^^^^ markup.italic +| ^^ - markup.italic +| ^ - markup.bold - markup.italic - punctuation +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end + This is ***bold italic* and just bold** | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.bold | ^^ punctuation.definition.bold.begin @@ -7118,33 +7266,134 @@ This is __*bold italic*__ | ^ punctuation.definition.italic.end | ^^ punctuation.definition.bold.end -This is ___bold italic___ +This is ___bold italic____ +| ^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^ markup.italic +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold_italic___ | ^^^^^^^^^^^^^^^^^ markup.bold | ^^ punctuation.definition.bold.begin | ^ punctuation.definition.italic.begin | ^^^^^^^^^^^^^ markup.italic +| ^ - punctuation | ^ punctuation.definition.italic.end | ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold _italic___ +| ^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^ markup.italic +| ^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation -This is ___bold italic_ and just bold__ +This is ___bold _ italic___ +| ^^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^^ markup.italic +| ^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold__italic___ +| ^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^ markup.italic +| ^^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold __italic___ +| ^^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^^ markup.italic +| ^^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold __ italic___ +| ^^^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^^^ markup.italic +| ^^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold ___italic___ +| ^^^^^^^^^^^^^^^^^^^^ markup.bold +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^^^^^^^^^^^^^^^ markup.italic +| ^^^ - punctuation +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end +| ^ - markup.bold - markup.italic - punctuation + +This is ___bold italic__ __bold italic___ +| ^^^^^^^^^^^^^^^^ markup.bold.markdown +| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.italic.markdown +| ^ markup.italic - markup.bold +| ^^^^^^^^^^^^^^^ markup.bold.markdown +| ^ - markup.bold +| ^ - markup.bold - markup.italic - punctuation +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^^ punctuation.definition.bold.end +| ^^ punctuation.definition.bold.begin +| ^^ punctuation.definition.bold.end +| ^ punctuation.definition.italic.end + +This is ___bold italic_ _bold italic___ +| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.bold.markdown +| ^^^^^^^^^^^^^ markup.italic +| ^ - markup.italic +| ^^^^^^^^^^^^ markup.italic +| ^^ - markup.italic +| ^ - markup.bold - markup.italic - punctuation +| ^^ punctuation.definition.bold.begin +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^ punctuation.definition.italic.begin +| ^ punctuation.definition.italic.end +| ^^ punctuation.definition.bold.end + +This is ___bold italic_ and just bold___ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.bold | ^^ punctuation.definition.bold.begin | ^ punctuation.definition.italic.begin | ^^^^^^^^^^^^^ markup.italic | ^ punctuation.definition.italic.end -| ^^^^^^^^^^^^^^^^ - markup.italic +| ^^^^^^^^^^^^^^^^^ - markup.italic | ^^ punctuation.definition.bold.end +| ^ - markup.bold - punctuation The next scope overlap funny because we have to pick one order to scope three indicators in a row -This is ___bold italic__ and just italic_ +This is ___bold italic__ and just italic__ | ^^^^^^^^^^^^^^^ markup.bold | ^^ punctuation.definition.bold.begin | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.italic | ^ punctuation.definition.italic.begin | ^^ punctuation.definition.bold.end -| ^^^^^^^^^^^^^^^^^ - markup.bold +| ^^^^^^^^^^^^^^^^^^ - markup.bold | ^ punctuation.definition.italic.end +| ^ - markup.italic - punctuation This is _**italic bold**_ | ^^^^^^^^^^^^^^^^^ markup.italic @@ -9346,3 +9595,73 @@ paragraph ::: |<- markup.raw.block.markdown |^^^^^^^ markup.raw.block.markdown + + + +Conflict in SETEXT heading +<<<<<<< HEAD +| <- meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^^^^^ meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^ meta.block.conflict.begin.diff - punctuation +| ^^^^ meta.block.conflict.begin.diff entity.name.section.diff +| ^ meta.block.conflict.begin.diff - punctuation +==== +======= +| <- meta.block.conflict.separator.diff punctuation.section.block.diff +| ^^^^^ meta.block.conflict.separator.diff punctuation.section.block.diff +| ^ meta.block.conflict.separator.diff - punctuation +== +>>>>>>> master +| <- meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^^^^^ meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^ meta.block.conflict.end.diff - entity - punctuation +| ^^^^^^ meta.block.conflict.end.diff entity.name.section.diff +| ^ meta.block.conflict.end.diff - entity - punctuation + + + + +<<<<<<< HEAD +| <- meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^^^^^ meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^ meta.block.conflict.begin.diff - punctuation +| ^^^^ meta.block.conflict.begin.diff entity.name.section.diff +| ^ meta.block.conflict.begin.diff - punctuation +# Conflicting in ATX Heading +======= +| <- meta.block.conflict.separator.diff punctuation.section.block.diff +| ^^^^^ meta.block.conflict.separator.diff punctuation.section.block.diff +| ^ meta.block.conflict.separator.diff - punctuation +# Conflicting in ATX Heading +>>>>>>> master +| <- meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^^^^^ meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^ meta.block.conflict.end.diff - entity - punctuation +| ^^^^^^ meta.block.conflict.end.diff entity.name.section.diff +| ^ meta.block.conflict.end.diff - entity - punctuation + + + + +<<<<<<< HEAD +| <- meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^^^^^ meta.block.conflict.begin.diff punctuation.section.block.begin.diff +| ^ meta.block.conflict.begin.diff - entity - punctuation +| ^^^^ meta.block.conflict.begin.diff entity.name.section.diff +| ^ meta.block.conflict.begin.diff - entity - punctuation + +our paragraph + +======= +| <- meta.block.conflict.separator.diff punctuation.section.block.diff +| ^^^^^ meta.block.conflict.separator.diff punctuation.section.block.diff +| ^ meta.block.conflict.separator.diff - punctuation + +their paragraph + +>>>>>>> master +| <- meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^^^^^ meta.block.conflict.end.diff punctuation.section.block.end.diff +| ^ meta.block.conflict.end.diff - entity - punctuation +| ^^^^^^ meta.block.conflict.end.diff entity.name.section.diff +| ^ meta.block.conflict.end.diff - entity - punctuation