From ebe6a683c9d57e17622c0ea67b3ce861ef25c511 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 21 Jan 2025 09:19:21 +0100 Subject: [PATCH] github-headline: adapt parsing for latest GitHub design changes Signed-off-by: Patrizio Bekerle --- github-headline/github-headline.qml | 7 ++++++- github-headline/info.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/github-headline/github-headline.qml b/github-headline/github-headline.qml index 77135be..a1c65da 100644 --- a/github-headline/github-headline.qml +++ b/github-headline/github-headline.qml @@ -26,9 +26,14 @@ QtObject { // script.log(output); // parse the headline - var re2 = /]*>\s*(.+?)\s*<\/bdi>/im + var re2 = /]*>\s*(.+?)\s*<\/bdi>/im var result2 = re2.exec(output); + if (result2 == null) { + var re2 = /]*>\s*(.+?)\s*<\/bdi>/im + var result2 = re2.exec(output); + } + if (result2 == null) { re2 = /]*>\s*(.+?)\s*<\/span>/im result2 = re2.exec(output); diff --git a/github-headline/info.json b/github-headline/info.json index de645c5..ef00142 100644 --- a/github-headline/info.json +++ b/github-headline/info.json @@ -2,7 +2,7 @@ "name": "GitHub Headline", "identifier": "github-headline", "script": "github-headline.qml", - "version": "0.2.2", + "version": "0.2.3", "minAppVersion": "17.05.6", "authors": ["@pbek"], "description" : "Inserts a headline and a link to the GitHub issue or pull request from an url in the clipboard into the current note when you paste the link with Ctrl + Shift + V."