Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 #607

Merged
merged 290 commits into from
Sep 12, 2021
Merged

3.0.0 #607

merged 290 commits into from
Sep 12, 2021

Conversation

deathaxe
Copy link
Member

@deathaxe deathaxe commented May 14, 2021

MarkdownEditing 3.0.0 Changelog

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

This is a major release with several breaking changes, which are required to
fix issues, avoid possible confilcts with other packages and enhance overall
handling of user settings.

If you defined custom key bindings or settings you might need to check those
as command names have changed (prefixed by mde_) and all preferences are
moved to Preferences.sublime-settings.

Bug Fixes

Behavior Fixes

Syntax Fixes

New Features

  • heading levels can be changed incrementally via ctrl+alt+, and ctrl+alt+. (fixes Applying heading prefix to current line without selecting text #78)
  • Toggle Centered Line added to Command Palette (fixes Command Palette: Keep Current Line Centered #118)
  • a new setting mde.list_align_text controls whether list item text is alignt to indention levels
  • key binding (alt+t) to create new or convert empty list item to gfm task
  • key binding (alt+x) to toggle task lists (fixes Shortcut Toggle GFM Task #589)
  • Color scheme quick panel lists all available MarkdownEditor-.sublime-color-scheme files (fixes how to add new color theme #563)
  • fenced codeblocks learned to highlight DOS Batch syntax
  • key bindings and snippets to easily insert, accept or reject critic markup
    • press alt+c, alt+a to insert addition
    • press alt+c, alt+d to insert deletion
    • press alt+c, alt+h to insert highlight
    • press alt+c, alt+s to insert substitution
    • press alt+c, alt+c to insert comment
    • press alt+enter to accept critic
    • press alt+backspace to reject critic

Changes

  • All syntaxes use sublime-syntax format (fixes Update all the syntaxes to new syntax file format #324)
  • Requires ST 3176+ (closes After upgrade from 2.2 to 2.2.4, I cannot see GFM in syntax options #463)
  • Opt-in to ST4's python3.8 plugin host
  • Reorganize all python modules in a plugins sub directory
  • Merge several python modules to group functions logically
  • Removed most syntax specific settings (fixes Too many settings in settings file #209, fixes Tons of blank space when using "Word Wrap". When not, caret starts off at middle #501, fixes Fix error in MultiMarkdown.sublime-settings #509)
  • Settings are displayed side-by-side (fixes Open settings side-by-side with one command instead of separately in two commands #609)
  • Settings are now placed in Preferences.sublime-settings
  • Reorganize key bindings to group them by logical function
  • MultiMarkdown is converted to sublime-syntax format
  • Bold/Italics style is now configured via Preferences
    (removed Bold and Italic Markers.tmPreferences)
  • The mde_fold_section command now respects previously set folding level
    (Results in more consistend and logical behavior when combined wth mde_fold_all_sections)
  • new commands:
    • mde_change_headings_level
    • mde_fold_links
    • mde_match_heading_hashes
    • mde_toggle_centered_line
    • mde_toggle_task_list_item
    • unindent_list_item replaces indent_list_item(reverse=True) and indent_list_multiitem(reverse=True)
  • removed commands:
    • indent_list_multiitem
  • renamed commands (all commands are prefixed with mde_):
    • complete_underlined_header -> mde_complete_underlined_headings
    • convert_inline_link_to_reference -> mde_convert_inline_link_to_reference
    • convert_inline_links_to_references -> mde_convert_inline_links_to_references
    • convert_to_atx -> mde_convert_underlined_headings_to_atx
    • deindent_quote -> mde_unindent_quote
    • fix_all_underlined_headers -> mde_fix_underlined_headings
    • fold_all_sections -> mde_fold_all_sections
    • fold_section -> mde_fold_section
    • gather_missing_footnotes -> mde_gather_missing_footnotes
    • gather_missing_link_markers -> mde_gather_missing_link_markers
    • goto_next_heading -> mde_goto_next_heading
    • goto_previous_heading -> mde_goto_previous_heading
    • indent_list_item -> mde_indent_list_item (is used for all items/situations) (fixes Rename indent_list_item command to something else #530)
    • indent_quote -> mde_indent_quote
    • list_back_links -> mde_list_back_links
    • magic_footnotes -> mde_magic_footnotes
    • make_page_reference -> mde_make_page_reference
    • markdown_lint -> mde_markdown_lint
    • markdown_lint_mdl -> mde_markdown_lint_mdl
    • mde_color_activate -> mde_select_color_scheme
    • number_list -> mde_number_list
    • number_list_reference -> mde_add_numbered_reference_definition
    • open_home_page -> mde_open_home_page
    • open_journal -> mde_open_journal
    • open_page -> mde_open_page
    • reference_delete_reference -> mde_reference_delete_reference
    • reference_jump -> mde_reference_jump
    • reference_new_footnote -> mde_reference_new_footnote
    • reference_new_image -> mde_reference_new_image
    • reference_new_inline_image -> mde_reference_new_inline_image
    • reference_new_inline_link -> mde_reference_new_inline_link
    • reference_new_reference -> mde_reference_new_reference
    • reference_organize -> mde_reference_organize
    • show_fold_all_sections -> mde_show_fold_all_sections
    • switch_list_bullet_type -> mde_switch_list_bullet_type
    • unfold_all_sections -> mde_unfold_all_sections
  • renamed settings:
    • mde.match_haeder_hash -> mde.match_heading_hashes

This commit makes sure to run `Transform Word` macros only when hitting
`alt+i` or `alt+b` within a word. Before this commit hitting those keys
in whitespace position added: `__|` or `****|` because the macros move
caret to the end of the added snippet.

With this commit hitting those keys adds `_|_` or `**|**` to buffer.

Note: Overall behavior is not yet satisfying. May need a plugin to
implement more intelligent solution.
Fixes an issue with filtering unwanted directories during `os.walk` and
makes sure to walk once only. The original script from GitGutter called
os.walk for each file extension. Now file extensions are enumerated
within each os.walk iteration.
This commit moves linting text commands as well as required imports to
the top of the file. Public stuff should come first so python finds them
faster when looking for imports.

Note: This maintenance commit doesn't include changes in behavior.
Instead of querying `len(view.sel()) > 0` just assume a selection is
present and catch the `IndexError` if not.
This commit replaces all `from ... import *` as linters have issues
detecting correct instances.

Note: This maintenance commit doesn't include changes in behavior.
This commit applies changes to python modules to make them comply with
pep8 style guide lines. Some of the fixed issues caused deprecation
warnings when running on ST's python 3.8 plugin host.

Flake8 is used to check for issues.
This commit...

1. adds flake8 to github actions
2. adds flake8 setup files

Note: Can't use pyproject.toml to maintain compatibility with python 3.3
      which is ST3's runtime to check the code against, too.
This commit adds a .python-version to make all plugins run on python 3.8
in ST4. This is now possible as all required syntax changes are completed.
Fixes #567
Fixes #595

This commit...

1. moves MdeColorActivate to color_schemes.py
2. renames it to MdeSelectColorScheme
3. renames the menu/command caption to "Select Color Scheme", which is
   the term used by ST's core "UI: Select Color Scheme" command.

   Note: Maybe a general "Select Syntax Specific Color Scheme" was an
   overall better solution, but that's out of scope of this package.

The new command

1. Enumerates all existing "MarkdownEditor*.sublime-color-scheme" files,
   so users or other packages can add their own color schemes.
2. Applies the color scheme to the markdown syntax of the current view.
   Means: If the current view is set to MultiMarkdown, the chosen color
   scheme is written to MultiMarkdown.sublime-settings instead of
   Markdown.sublime-settings. This is to enable the functionality for
   all markdown flavors.
3. The "Global" Color Scheme is moved to the top of the selection list
   and is the default. The package no longer enforces "MarkdownEditor"
   as default color scheme. A user must decide to use a syntax specific
   color scheme as of now.
4. The global color scheme is applied by removing the syntax specific
   color_scheme setting so later changes to the global color scheme
   don't prevent Markdown files from changing, too.
A default sublime-settings file, nor a syntax specific one should ever
define file extensions as this has several disadvantages.

Instead desired assignments are defined directly in the syntax definitions.
Fixes #565

This commit fixes linter rule md027 to not trigger at indented lists.
Fixes #564

The pattern now matches if only empty lines are found between two block
quotes.
This commit replaces the `decide_title` module by a simpler
implementation, which uses scopes to find the first header of a document
instead of parsing the whole text using regexp.

A ViewEventListener is used as it is instantiated only for views with
Markdown syntax assigned.
This commit groups some view related event listeners to reduce the
number of tiny one-purpose modules.

KeepCurrentLineCentered is only active if exactly one caret is in the
view. It doesn't work well otherwise.
This commit ...
1. moves all WikiPage related command classes into wiki_page.py to
   reduce amount of trivial one-purpose modules.
2. adds prefix 'Mde' to all commands in order to prevent possible naming
   conflicts with other packages.
This commit ...
1. Moves content of mdeutils into view as it contains very general view
   related functions.
2. Renames the Prefix from MDE to Mde as this is the general prefix
   being introduced to all commands in order to prevent possible naming
   conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit...
1. merges indent_list_item and indent_list_multiitem
2. adds prefix 'Mde' to all commands in order to prevent
   possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit adds prefix 'Mde' to all commands in order to prevent
possible naming conflicts with other packages.
This commit...

1. adds prefix 'Mde' to all commands in order to prevent
   possible naming conflicts with other packages.
2. renames the underlined_headers.py module to headings.py.
3. renames all commands to use "headings" instead of "headers"
This commit adds a python logging facility for debug/error logging.

Log level can be controlled via Markdown.sublime-settings.

Note: It applies to all markdown flavors.
As a result of 8b99048 paragraphs need
to be terminated once triple backticks start a line.
This commit ...

1. enables existing functions to handle all ordered list types
2. enables `mde_number_list` command to be executed in block quotes
3. teaches `mde_number_list` command to handle multiple carets

Renumbering ordered list items needs more work to make it a bit smarter
with regards to re-numbering all following items and proper whitespace
handling in a future commit.
List bullets are fixed Markdown standards, so they don't need to be
customizable via preferences.
Highlighting via provided color schemes changed slightly due syntax
changes. This commit updates color schemes accordingly.
A real document is needed to tweak color schemes, so it can be used for
preview as well.
- Critics
- Diffs
- Linter
- Plugins
Checkboxes shouldn't use a scope whose top-level scope is otherwise used
for ordinary code, in order to prevent unwanted interference.

Checkboxes are markup the same way as html tags or the lists are they
are associated with.
This commit tweaks context for backtick auto-pairing key binding.

Auto pairing takes place if following conditions are met:

- caret is not located directly after a word or backtick
- caret is followed by
  - whitespace
  - closing bracket
  - sentence punctuation (comma, full stop)
  - end of line
This commit ...

1. includes `paragraph-end` into `bold-italic-trailing` context
2. moves the `bold-italic-trailing` includes before `inline` includes
   to terminate inline formatting by fenced code blocks
3. renames `bold-italic-trailing` to `bold-italic-common` and moves the
   `inline` include into it.

Everything, which terminates a paragraph, now also terminates inline
formatting.
This commit implements a re-interpreted version of CommonMark's
statement:

  The first word of the info string is typically used to specify
  the language of the code sample...

  see: https://spec.commonmark.org/0.30/#fenced-code-blocks

A word is not only `[\w-]+` but a sequence of any non-whitespace
character, except backticks, in this context.

This is why `C++` is an valid fenced code language identifier.

This commit expects a language identifier to start with a letter,
in order to avoid confusion with e.g. attribute annotations such as
`{key=value}` which some Markdown extension support.
@deathaxe deathaxe marked this pull request as ready for review September 12, 2021 15:58
@deathaxe deathaxe merged commit 8179cb4 into master Sep 12, 2021
@deathaxe deathaxe deleted the 3.0.0 branch September 12, 2021 15:59
@maliayas
Copy link
Member

Congrats! Thanks very much for the huge release and all the effort behind it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment