Skip to content

Commit

Permalink
fix: correct spelling for highlight throughout codebase (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
bandantonio authored Jul 16, 2024
1 parent e5b071a commit c9d0009
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 54 deletions.
48 changes: 24 additions & 24 deletions src/db/seedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,87 +35,87 @@ export const defaultBooks = [{
export const defaultAnnotations = [{
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE1",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the iPhone User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the iPhone User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-iphone-user-guide",
"ZANNOTATIONNOTE": "Test note for the hightlight from the iPhone User Guide",
"ZANNOTATIONNOTE": "Test note for the highlight from the iPhone User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 0
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE2",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the iPad User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the iPad User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the iPad User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the iPad User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-ipad-user-guide",
"ZANNOTATIONNOTE": "Test note for the hightlight from the iPad User Guide",
"ZANNOTATIONNOTE": "Test note for the highlight from the iPad User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 0
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE3",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the Mac User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the Mac User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the Mac User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the Mac User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-mac-user-guide",
"ZANNOTATIONNOTE": "Test note for the hightlight from the Mac User Guide",
"ZANNOTATIONNOTE": "Test note for the highlight from the Mac User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 0
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE4",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the Apple Watch User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the Apple Watch User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the Apple Watch User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the Apple Watch User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-apple-watch-user-guide",
"ZANNOTATIONNOTE": "Test note for the hightlight from the Apple Watch User Guide",
"ZANNOTATIONNOTE": "Test note for the highlight from the Apple Watch User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 0
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE1",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the iPhone User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the iPhone User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-iphone-user-guide",
"ZANNOTATIONNOTE": "Test note for the deleted hightlight from the iPhone User Guide",
"ZANNOTATIONNOTE": "Test note for the deleted highlight from the iPhone User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 1
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE2",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the iPad User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the iPad User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the iPad User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the iPad User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-ipad-user-guide",
"ZANNOTATIONNOTE": "Test note for the deleted hightlight from the iPad User Guide",
"ZANNOTATIONNOTE": "Test note for the deleted highlight from the iPad User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 1
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE3",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the Mac User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the Mac User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the Mac User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the Mac User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-mac-user-guide",
"ZANNOTATIONNOTE": "Test note for the deleted hightlight from the Mac User Guide",
"ZANNOTATIONNOTE": "Test note for the deleted highlight from the Mac User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 1
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE4",
"ZFUTUREPROOFING5": "Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the hightlight from the Apple Watch User Guide",
"ZANNOTATIONSELECTEDTEXT": "hightlight from the Apple Watch User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the highlight from the Apple Watch User Guide",
"ZANNOTATIONSELECTEDTEXT": "highlight from the Apple Watch User Guide",
"ZANNOTATIONLOCATION": "test-highlight-link-from-the-apple-watch-user-guide",
"ZANNOTATIONNOTE": "Test note for the deleted hightlight from the Apple Watch User Guide",
"ZANNOTATIONNOTE": "Test note for the deleted highlight from the Apple Watch User Guide",
"ZANNOTATIONCREATIONDATE": 685151385.91602,
"ZANNOTATIONMODIFICATIONDATE": 685151385.91602,
"ZANNOTATIONSTYLE": 3,
Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class IBookHighlightsSettingTab extends PluginSettingTab {

new Setting(containerEl)
.setName('Import highlights on start')
.setDesc('Import all hightlights from all your books when Obsidian starts')
.setDesc('Import all highlights from all your books when Obsidian starts')
.addToggle((toggle) => {
toggle.setValue(this.plugin.settings.importOnStart)
.onChange(async (value) => {
Expand Down
10 changes: 5 additions & 5 deletions test/db.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ describe('Database operations', () => {
const highlights = await annotationsRequest(dbPath, `SELECT * FROM ${HIGHLIGHTS_LIBRARY_NAME} WHERE ZANNOTATIONDELETED = 0`);

expect(highlights.length).toEqual(4);
expect(highlights[0].ZANNOTATIONNOTE).toEqual('Test note for the hightlight from the iPhone User Guide');
expect(highlights[3].ZANNOTATIONREPRESENTATIVETEXT).toEqual('This is a contextual text for the hightlight from the Apple Watch User Guide');
expect(highlights[0].ZANNOTATIONNOTE).toEqual('Test note for the highlight from the iPhone User Guide');
expect(highlights[3].ZANNOTATIONREPRESENTATIVETEXT).toEqual('This is a contextual text for the highlight from the Apple Watch User Guide');
});

test('Should return a highlight link for each highlight when highlights library is not empty', async () => {
Expand Down Expand Up @@ -100,10 +100,10 @@ describe('Database load testing', () => {
threeThousandsAnnotations.push({
ZANNOTATIONASSETID: `THBFYNJKTGFTTVCGSAE${i}`,
ZFUTUREPROOFING5: `Introduction ${j}`,
ZANNOTATIONREPRESENTATIVETEXT: `This is a contextual text for the hightlight from the Book ${i}`,
ZANNOTATIONSELECTEDTEXT: `hightlight from the Book ${i}`,
ZANNOTATIONREPRESENTATIVETEXT: `This is a contextual text for the highlight from the Book ${i}`,
ZANNOTATIONSELECTEDTEXT: `highlight from the Book ${i}`,
ZANNOTATIONLOCATION: `test-highlight-link-from-the-book-${i}`,
ZANNOTATIONNOTE: `Test note for the hightlight from the Book ${i}`,
ZANNOTATIONNOTE: `Test note for the highlight from the Book ${i}`,
ZANNOTATIONCREATIONDATE: 685151385.91602,
ZANNOTATIONMODIFICATIONDATE: 685151385.91602,
ZANNOTATIONSTYLE: 3,
Expand Down
24 changes: 12 additions & 12 deletions test/mocks/aggregatedDetailsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ export const booksToAggregate = [{
export const annotationsToAggregate = [{
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE5",
"ZFUTUREPROOFING5": "Aggregated Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "aggregated hightlight from the Apple iPhone User Guide",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the aggregated highlight from the Apple iPhone User Guide",
"ZANNOTATIONSELECTEDTEXT": "aggregated highlight from the Apple iPhone User Guide",
"ZANNOTATIONLOCATION": "aggregated-highlight-link-from-the-apple-iphone-user-guide",
"ZANNOTATIONNOTE": "Test note for the aggregated hightlight from the Apple iPhone User Guide",
"ZANNOTATIONNOTE": "Test note for the aggregated highlight from the Apple iPhone User Guide",
"ZANNOTATIONCREATIONDATE": 731876693.002279,
"ZANNOTATIONMODIFICATIONDATE": 731876693.002279,
"ZANNOTATIONSTYLE": 3,
"ZANNOTATIONDELETED": 0
}, {
"ZANNOTATIONASSETID": "THBFYNJKTGFTTVCGSAE5",
"ZFUTUREPROOFING5": "Another aggregated Introduction",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide\n\ncontaining a new line to test the preservation of indentation",
"ZANNOTATIONSELECTEDTEXT": "aggregated hightlight from the Apple iPhone User Guide\n\ncontaining a new line to test the preservation of indentation",
"ZANNOTATIONREPRESENTATIVETEXT": "This is a contextual text for the aggregated highlight from the Apple iPhone User Guide\n\ncontaining a new line to test the preservation of indentation",
"ZANNOTATIONSELECTEDTEXT": "aggregated highlight from the Apple iPhone User Guide\n\ncontaining a new line to test the preservation of indentation",
"ZANNOTATIONLOCATION": "aggregated-highlight-link-from-the-apple-iphone-user-guide",
"ZANNOTATIONNOTE": "Test note for the aggregated hightlight from the Apple iPhone User Guide\n\nalong with a new line to test the preservation of indentation",
"ZANNOTATIONNOTE": "Test note for the aggregated highlight from the Apple iPhone User Guide\n\nalong with a new line to test the preservation of indentation",
"ZANNOTATIONCREATIONDATE": 731876693.002279,
"ZANNOTATIONMODIFICATIONDATE": 731876693.002279,
"ZANNOTATIONSTYLE": 3,
Expand All @@ -42,18 +42,18 @@ export const aggregatedHighlights = [{
"bookCoverUrl": '',
"annotations": [{
"chapter": "Aggregated Introduction",
"contextualText": "This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide",
"highlight": "aggregated hightlight from the Apple iPhone User Guide",
"note": "Test note for the aggregated hightlight from the Apple iPhone User Guide",
"contextualText": "This is a contextual text for the aggregated highlight from the Apple iPhone User Guide",
"highlight": "aggregated highlight from the Apple iPhone User Guide",
"note": "Test note for the aggregated highlight from the Apple iPhone User Guide",
"highlightLocation": "aggregated-highlight-link-from-the-apple-iphone-user-guide",
"highlightStyle": 3,
"highlightCreationDate": 731876693.002279,
"highlightModificationDate": 731876693.002279
}, {
"chapter": "Another aggregated Introduction",
"contextualText": "This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide\ncontaining a new line to test the preservation of indentation",
"highlight": "aggregated hightlight from the Apple iPhone User Guide\ncontaining a new line to test the preservation of indentation",
"note": "Test note for the aggregated hightlight from the Apple iPhone User Guide\nalong with a new line to test the preservation of indentation",
"contextualText": "This is a contextual text for the aggregated highlight from the Apple iPhone User Guide\ncontaining a new line to test the preservation of indentation",
"highlight": "aggregated highlight from the Apple iPhone User Guide\ncontaining a new line to test the preservation of indentation",
"note": "Test note for the aggregated highlight from the Apple iPhone User Guide\nalong with a new line to test the preservation of indentation",
"highlightLocation": "aggregated-highlight-link-from-the-apple-iphone-user-guide",
"highlightStyle": 3,
"highlightCreationDate": 731876693.002279,
Expand Down
24 changes: 12 additions & 12 deletions test/mocks/renderedTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Number of annotations:: 2
----
- 📖 Chapter:: Aggregated Introduction
- 🔖 Context:: This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide
- 🎯 Highlight:: aggregated hightlight from the Apple iPhone User Guide
- 📝 Note:: Test note for the aggregated hightlight from the Apple iPhone User Guide
- 🔖 Context:: This is a contextual text for the aggregated highlight from the Apple iPhone User Guide
- 🎯 Highlight:: aggregated highlight from the Apple iPhone User Guide
- 📝 Note:: Test note for the aggregated highlight from the Apple iPhone User Guide
- 📙 Highlight Link:: [Apple Books Highlight Link](ibooks://assetid/THBFYNJKTGFTTVCGSAE5#aggregated-highlight-link-from-the-apple-iphone-user-guide)
----
- 📖 Chapter:: Another aggregated Introduction
- 🔖 Context:: This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide
- 🔖 Context:: This is a contextual text for the aggregated highlight from the Apple iPhone User Guide
containing a new line to test the preservation of indentation
- 🎯 Highlight:: aggregated hightlight from the Apple iPhone User Guide
- 🎯 Highlight:: aggregated highlight from the Apple iPhone User Guide
containing a new line to test the preservation of indentation
- 📝 Note:: Test note for the aggregated hightlight from the Apple iPhone User Guide
- 📝 Note:: Test note for the aggregated highlight from the Apple iPhone User Guide
along with a new line to test the preservation of indentation
- 📙 Highlight Link:: [Apple Books Highlight Link](ibooks://assetid/THBFYNJKTGFTTVCGSAE5#aggregated-highlight-link-from-the-apple-iphone-user-guide)
Expand All @@ -43,21 +43,21 @@ Number of annotations:: 2
----
- 📖 Chapter:: Aggregated Introduction
- 🔖 Context:: This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide
- 🎯 Highlight:: <mark style="background:rgb(249,213,108); color:#000; padding:2px;">aggregated hightlight from the Apple iPhone User Guide</mark>
- 📝 Note:: Test note for the aggregated hightlight from the Apple iPhone User Guide
- 🔖 Context:: This is a contextual text for the aggregated highlight from the Apple iPhone User Guide
- 🎯 Highlight:: <mark style="background:rgb(249,213,108); color:#000; padding:2px;">aggregated highlight from the Apple iPhone User Guide</mark>
- 📝 Note:: Test note for the aggregated highlight from the Apple iPhone User Guide
- 📙 Highlight Link:: [Apple Books Highlight Link](ibooks://assetid/THBFYNJKTGFTTVCGSAE5#aggregated-highlight-link-from-the-apple-iphone-user-guide)
- <small>📅 Highlight taken on:: 2024-03-11 03:04:53 PM -04:00</small>
- <small>📅 Highlight modified on:: 2024-03-11 03:04:53 PM -04:00</small>
----
- 📖 Chapter:: Another aggregated Introduction
- 🔖 Context:: This is a contextual text for the aggregated hightlight from the Apple iPhone User Guide
- 🔖 Context:: This is a contextual text for the aggregated highlight from the Apple iPhone User Guide
containing a new line to test the preservation of indentation
- 🎯 Highlight:: <mark style="background:rgb(249,213,108); color:#000; padding:2px;">aggregated hightlight from the Apple iPhone User Guide
- 🎯 Highlight:: <mark style="background:rgb(249,213,108); color:#000; padding:2px;">aggregated highlight from the Apple iPhone User Guide
containing a new line to test the preservation of indentation</mark>
- 📝 Note:: Test note for the aggregated hightlight from the Apple iPhone User Guide
- 📝 Note:: Test note for the aggregated highlight from the Apple iPhone User Guide
along with a new line to test the preservation of indentation
- 📙 Highlight Link:: [Apple Books Highlight Link](ibooks://assetid/THBFYNJKTGFTTVCGSAE5#aggregated-highlight-link-from-the-apple-iphone-user-guide)
- <small>📅 Highlight taken on:: 2024-03-11 03:04:53 PM -04:00</small>
Expand Down
Binary file modified test/mocks/testDatabase.sqlite
Binary file not shown.

0 comments on commit c9d0009

Please sign in to comment.