From 93a9d3963afe02ce00eebe110711615dc76bd8ca Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Sun, 16 Sep 2018 18:55:12 -0600 Subject: [PATCH] Prep 2.5.3 (#122) --- CHANGES.md | 19 +++++-------------- support.py | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5022b12..9f9335b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,46 +1,37 @@ -## ApplySyntax 2.5.2 +## ApplySyntax 2.5.3 + +- **FIX**: Use proper Bash syntax. +- **FIX**: Use proper Git syntax. (!119) -Released Jun 15, 2018 +## ApplySyntax 2.5.2 - **FIX**: Update shell scripts to use newest Bash language file. ## ApplySyntax 2.5.1 -Released Apr 21, 2018 - - **FIX**: Update `Rspec` rule with `RSpec Buddy/RSpec Buddy`. ## ApplySyntax 2.5.0 -Released Nov 8, 2017 - - **NEW**: Add document and settings command to command palette. - **FIX**: Handling of list syntax. ## ApplySyntax 2.4.1 -Released June 16, 2017 - - **FIX**: Fix usage of deprecated key name in default settings. ## ApplySyntax 2.4.0 -Released May 27, 2017 - - **NEW**: Added TypoScript rules. - **NEW**: Restrict phantoms to 3124+. - **NEW**: Support commands. ## ApplySyntax 2.3.1 -Released Oct 19, 2016 - - **FIX**: Config tweaks to YAML rules. ## ApplySyntax 2.3.0 -Released Aug 21, 2016 - - **NEW**: Added changelog command. - **NEW**: Added support command. - **FIX**: Fix issue where `new_file_syntax` would occasionally not work [#100](https://github.com/facelessuser/ApplySyntax/issues/100). diff --git a/support.py b/support.py index 24c70bf..608d819 100644 --- a/support.py +++ b/support.py @@ -5,7 +5,7 @@ import webbrowser import re -__version__ = "2.5.2" +__version__ = "2.5.3" __pc_name__ = 'ApplySyntax' CSS = ''' @@ -18,6 +18,31 @@ .apply-syntax a { text-decoration: none; } ''' +frontmatter = { + "markdown_extensions": [ + "markdown.extensions.admonition", + "markdown.extensions.attr_list", + "markdown.extensions.def_list", + "markdown.extensions.nl2br", + # Smart quotes always have corner cases that annoy me, so don't bother with them. + {"markdown.extensions.smarty": {"smart_quotes": False}}, + "pymdownx.betterem", + { + "pymdownx.magiclink": { + "repo_url_shortener": True, + "repo_url_shorthand": True, + "user": "facelessuser", + "repo": "ApplySyntax" + } + }, + "pymdownx.extrarawhtml", + "pymdownx.keys", + {"pymdownx.escapeall": {"hardbreak": True, "nbsp": True}}, + # Sublime doesn't support superscript, so no ordinal numbers + {"pymdownx.smartsymbols": {"ordinal_numbers": False}} + ] +} + def list2string(obj): """Convert list to string.""" @@ -131,8 +156,11 @@ def run(self, page): try: import mdpopups + import pymdownx has_phantom_support = (mdpopups.version() >= (1, 10, 0)) and (int(sublime.version()) >= 3124) + fmatter = mdpopups.format_frontmatter(frontmatter) if pymdownx.version_info[:3] >= (4, 3, 0) else '' except Exception: + fmatter = '' has_phantom_support = False if not has_phantom_support: @@ -148,7 +176,7 @@ def run(self, page): view, 'quickstart', sublime.Region(0), - text, + fmatter + text, sublime.LAYOUT_INLINE, css=CSS, wrapper_class="apply-syntax", @@ -167,8 +195,11 @@ def run(self): """Show the changelog in a new view.""" try: import mdpopups + import pymdownx has_phantom_support = (mdpopups.version() >= (1, 10, 0)) and (int(sublime.version()) >= 3124) + fmatter = mdpopups.format_frontmatter(frontmatter) if pymdownx.version_info[:3] >= (4, 3, 0) else '' except Exception: + fmatter = '' has_phantom_support = False text = sublime.load_resource('Packages/ApplySyntax/CHANGES.md') @@ -181,7 +212,7 @@ def run(self): view, 'changelog', sublime.Region(0), - text, + fmatter + text, sublime.LAYOUT_INLINE, wrapper_class="apply-syntax", css=CSS,