Skip to content

Releases: westonruter/syntax-highlighting-code-block

1.5.2

Choose a tag to compare

@westonruter westonruter released this 19 May 04:40
ad9f321
  • Bump tested up to version to 7.0 in #1079
  • Fix minor issues identified by Plugin Check in #1078

Full Changelog: 1.5.1...1.5.2

1.5.1

Choose a tag to compare

@westonruter westonruter released this 12 Nov 00:35
1ec59e4

What's Changed

  • Update dependencies
  • Bump minimum versions

Full Changelog: 1.5.0...1.5.1

1.5.0

Choose a tag to compare

@westonruter westonruter released this 02 Apr 19:41
eb75838

What's Changed

New Contributors

Full Changelog: 1.4.0...1.5.0

1.4.0

Choose a tag to compare

@westonruter westonruter released this 09 Mar 23:31
a158c67

What's Changed

New Contributors

Full Changelog: 1.3.1...1.4.0

Installation

Please install in WordPress via the Plugin Directory.

1.3.1

Choose a tag to compare

@westonruter westonruter released this 29 Dec 04:22
d054359
  • Fix ability to paste HTML markup into Code blocks (without it being converted to rich text). #245
  • Bump highlight.php to fix unexpected line number positioning. #246, #247
  • Fix line highlight background color on first render in Customizer and dynamically update default color when theme is changed. #251

Props to @allejo as always!

1.3.0

Choose a tag to compare

@westonruter westonruter released this 03 Dec 21:41
3a4b186

This release makes the necessary changes to add compatibility with WordPress 5.6 and Gutenberg 9.5.

  • Add language slug and name to <pre> wrapper element, including on data- attributes and an accessibility description (and SEO label) which is visually hidden by default. #208, #37
  • Add support for font size setting and fix line wrapping setting in Gutenberg 9.5. #228, #229, #230
  • Add support for Gutenberg 9.2. #200, #201, #188
  • Add option to remove styles from frontend via a syntax_highlighting_code_block_styling filter. #194, #212
  • Upgrade highlight.php to v9.18.1.3 to fix unexpected line number appearing on same line and empty code block causes highlight.php warning. #193, #189, #195
  • Bump highlight.php to 9.18.1.5 to improve performance for large code snippets. #223

Please see wiki for examples of advanced usage.

Props to @allejo as always! Thanks also to @mkaz.

1.2.3

Choose a tag to compare

@westonruter westonruter released this 30 Aug 06:00
eb49a95
  • Update highlight.php to v9.18.1.2, fixing UTF-8 characters being broken when given to \HighlightUtilities\splitCodeIntoArray(). #163. Props @allejo.
  • Update other dependencies.

1.2.2

Choose a tag to compare

@westonruter westonruter released this 04 Jul 04:00
b0ad70d

Fix ability for plugins to extend the Code block to have align support. Props @allejo. #128, #131

1.2.1

Choose a tag to compare

@westonruter westonruter released this 28 Jun 18:52
637f35a
  • Fix block validation errors when code contains special HTML characters. Add required escape() call in save function. #110, #118, #119
  • Fix compatibility with Gutenberg 8.3 which introduced server-side awareness of blocks. Fixes PHP notices for undefined index for highlightedLines and showLineNumbers with Gutenberg plugin. #116, #117
  • Update dependencies.

1.2.0

Choose a tag to compare

@westonruter westonruter released this 10 May 23:37
ecddb40

The plugin readme has been updated to include the latest features and behavior. Screenshot of new options for specifying highlighted lines, showing line numbers, and controlling line wrapping:

screenshot-1

For advanced usage, please see the new plugin wiki.

Huge thanks to @allejo for co-maintaining this project, tackling some of the biggest enhancements in this release in addition to maintaining the underlying highlight.php library that the plugin fundamentally depends on!

Changelog

  • ✨ Add support for highlighting specific lines. #20, #12
  • ✨ Use mark element to indicate highlighted lines, print styles immediately before block, ensure formatting when styles omitted, and add Wrap Lines option. #80, #78, #79
  • ✨ Add syntax_highlighting_code_block_auto_detect_languages filter, allowing you to restrict which languages are used for auto-detection. This can ensure the right language is used when the source is ambiguous. #36, #34
  • ✨ Define attribute schema in PHP with registered block type. #83
  • 🖍️ Remove padding from Code blocks. #82
  • 🖍️ Omit styles in RSS feeds and REST API responses. #93, #9.
  • 🐛 Register styles at wp_default_styles not wp_enqueue_scripts, ensuring that styles will be available in other contexts like AMP Reader mode. #35
  • 🐛 Fix compatibility with lightBlockWrapper for Code block in Gutenberg 7.9+. #73, #72
  • 🐛 Fix loading script dependencies list. #74
  • 🐛 Fix injection of classes in cached block output. #77
  • 🐛 Ensure proper text domain is passed to translation functions. #81
  • 🐛 Improve attribute naming. #92, #84, #95
  • 🐛 Improve robustness of injecting styles to prevent inadvertent display. #97