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

Release/v2.4.5 #1047

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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