Skip to content

Commit

Permalink
github-headline: adapt parsing for latest GitHub design changes
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <[email protected]>
  • Loading branch information
pbek committed Jan 21, 2025
1 parent 320b096 commit ebe6a68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion github-headline/github-headline.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ QtObject {
// script.log(output);

// parse the headline
var re2 = /<bdi class="\s*js-issue-title[^"]+"[^>]*>\s*(.+?)\s*<\/bdi>/im
var re2 = /<bdi class="[^"]+markdown-title"[^>]*>\s*(.+?)\s*<\/bdi>/im
var result2 = re2.exec(output);

if (result2 == null) {
var re2 = /<bdi class="\s*js-issue-title[^"]+"[^>]*>\s*(.+?)\s*<\/bdi>/im
var result2 = re2.exec(output);
}

if (result2 == null) {
re2 = /<span class="\s*js-issue-title[^"]+"[^>]*>\s*(.+?)\s*<\/span>/im
result2 = re2.exec(output);
Expand Down
2 changes: 1 addition & 1 deletion github-headline/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href='https://github.com/'>GitHub</a> issue or pull request from an url in the clipboard into the current note when you paste the link with <i>Ctrl + Shift + V</i>."
Expand Down

0 comments on commit ebe6a68

Please sign in to comment.