If you check out the attached image, you'll see a link with an extra underlined space at the end. I can't seem to make that extra space go away, and it is driving me nuts.
There are no spaces anywhere in my data. There are no spaces in the code. (I've got a screenshot showing whitespace rendering...)
---
// Import the books data from the JSON file
import books from '@data/books.json';
interface Book {
title: string;
author: string;
link: string;
}
---
<!-- Define your component's HTML here -->
<div>
<h1>Books</h1>
<ul>
{
books.map((book: Book) => (
<li>
<strong>
<a href={book.link.trim()} target="_blank" rel="noopener noreferrer">
{book.title}
</a>
</strong>
<span>by {book.author}</span>
</li>
))
}
</ul>
</div>
I used View Source to check the actual HTML, and sure enough, there is a space in there (screenshot attached)
Very mysterious!
Can anyone tell me why this is happening?