Skip to content

Commit

Permalink
Merge pull request #28 from Edo78/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Edo78 authored Jan 27, 2022
2 parents e3965d5 + a7c8e22 commit 7548044
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-koreader-plugin",
"name": "KOReader Highlights",
"version": "0.2.1",
"version": "0.2.2",
"minAppVersion": "0.12.0",
"description": "This is a plugin for Obsidian. This plugin syncs highlights and notes taken in KOReader.",
"author": "Federico \"Edo\" Granata",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-koreader-plugin",
"version": "0.2.1",
"version": "0.2.2",
"description": "This is a plugin for Obsidian. This plugin syncs highlights and notes taken in KOReader.",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export default class KOReader extends Plugin {
}) {
const { path, uniqueId, bookmark, managedBookTitle, book, keepInSync } =
note;
// the page is always the first number in the bookmark's text (eg. 'Pagine 12 foo bar')
const page = parseInt(bookmark.text.match(/\d+/g)[0]);
// the page is always the first number in the bookmark's text (eg. 'Pagina 12 foo bar')
const page = bookmark.text ? parseInt(bookmark.text.match(/\d+/g)[0]) : -1;
const noteItself = bookmark.text
? bookmark.text.split(bookmark.datetime)[1].replace(/^\s+|\s+$/g, '')
: '';
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"0.1.1": "0.12.0",
"0.1.2": "0.12.0",
"0.2.0": "0.12.0",
"0.2.1": "0.12.0"
"0.2.1": "0.12.0",
"0.2.2": "0.12.0"
}

0 comments on commit 7548044

Please sign in to comment.