Skip to content

Commit

Permalink
Bug fix for book links
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Ewing committed Nov 7, 2023
1 parent a21a844 commit 57b003d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h1>My Reading Log</h1>
let a = document.createElement('a');
// Replace spaces with dots or any other URL friendly character
// and encode the URI component to handle special characters
let bookTitleForURL = encodeURIComponent(book.title.replace(/ /g, '_'));
let bookTitleForURL = encodeURIComponent(book.title.replace(/ /g, '_')).toLowerCase();
a.href = `./books/${bookTitleForURL}.pdf`;
a.textContent = book.title;
a.classList.add('handwritten');
Expand Down

0 comments on commit 57b003d

Please sign in to comment.