Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Dec 5, 2024
1 parent 650951c commit ec16975
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/lib/components/documents/NoteHighlights.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@
-->

<script lang="ts">
import { getContext } from "svelte";
import type { Writable } from "svelte/store";
import type { Document } from "$lib/api/types";
import { getContext } from "svelte";
import { _ } from "svelte-i18n";
import type { Document } from "$lib/api/types";
import { noteUrl } from "$lib/api/notes";
import Highlight from "../common/Highlight.svelte";
import HighlightGroup from "../common/HighlightGroup.svelte";
import { noteUrl } from "$lib/api/notes";
export let document: Document;
export let open = true;
Expand All @@ -41,7 +43,7 @@
function noteHref(id: string): string {
const note = notes.get(id);
if (!note) return "";
return noteUrl(document, note).toString();
return noteUrl(document, note).href;
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/documents/PageHighlights.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
```
-->
<script lang="ts">
import type { Writable } from "svelte/store";
import type { Document } from "$lib/api/types";
import { getContext } from "svelte";
import type { Writable } from "svelte/store";
import { _ } from "svelte-i18n";
import Highlight from "../common/Highlight.svelte";
Expand All @@ -35,7 +35,7 @@
function pageHref(id: string): string {
const pageNo = pageNumber(id);
return pageUrl(document, pageNo).toString();
return pageUrl(document, pageNo).href;
}
</script>

Expand Down
2 changes: 2 additions & 0 deletions src/lib/components/documents/ResultsList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
const embed: boolean = getContext("embed");
setContext("highlightState", highlightState);
function collapseAll() {
highlightState.update((state) => ({ ...state, allOpen: false }));
}
function expandAll() {
highlightState.update((state) => ({ ...state, allOpen: true }));
}
Expand Down

0 comments on commit ec16975

Please sign in to comment.