Skip to content

Commit

Permalink
Merge pull request #1047 from alleyinteractive/release/v2.4.5
Browse files Browse the repository at this point in the history
Release/v2.4.5
  • Loading branch information
attackant committed Jan 23, 2024
2 parents 87723c2 + 8c42670 commit 9c125ab
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apple-news.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Plugin Name: Publish to Apple News
* Plugin URI: http://github.com/alleyinteractive/apple-news
* Description: Export and sync posts to Apple format.
* Version: 2.4.4
* Version: 2.4.5
* Author: Alley
* Author URI: https://alley.com
* Text Domain: apple-news
Expand Down
6 changes: 3 additions & 3 deletions includes/apple-exporter/components/class-heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ private static function split_image( string $html ): array {
*/
protected function build( $html ): void {
// Match HTML headings, capture level, id value if set, and heading text.
if ( 0 === preg_match( '#<h(\d).*?(id=(["\'])(.*?)\2)?.*?>(.*?)</h\1>#si', $html, $matches ) ) {
if ( 0 === preg_match( '/<h(\d)(?:[^>]*?\sid="([^"]*?)")?[^>]*?>(.*?)<\/h\1>/si', $html, $matches ) ) {
return;
}

$level = intval( $matches[1] );
$text = $matches[5];
$id = $matches[4] ?? null;
$id = $matches[2] ?? null;
$text = $matches[3];

// Parse and trim the resultant text, and if there is nothing left, bail.
$text = trim( $this->parser->parse( $text ) );
Expand Down
2 changes: 1 addition & 1 deletion includes/class-apple-news.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Apple_News {
* @var string
* @access public
*/
public static string $version = '2.4.4';
public static string $version = '2.4.5';

/**
* Link to support for the plugin on WordPress.org.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "publish-to-apple-news",
"version": "2.4.4",
"version": "2.4.5",
"license": "GPLv3",
"main": "index.php",
"engines": {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: publish, apple, news, iOS
Requires at least: 6.3
Tested up to: 6.4.2
Requires PHP: 8.0
Stable tag: 2.4.4
Stable tag: 2.4.5
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl.html

Expand Down Expand Up @@ -46,6 +46,9 @@ Please visit our [wiki](https://github.com/alleyinteractive/apple-news/wiki) for

== Changelog ==

= 2.4.5 =
* Fixes regular expression for adding identifiers.

= 2.4.4 =

* Enhancement: Adds support for the anchor links.
Expand Down

0 comments on commit 9c125ab

Please sign in to comment.