Comments (5)
<br>
should work. But I found that my case is a little special. The newline begins with 4 spaces. And Obsidian can't render that correctly without a >
in each line.
from obsidian-apple-books-highlights-plugin.
<br>
should work. But I found that my case is a little special. The newline begins with 4 spaces. And Obsidian can't render that correctly without a>
in each line.
The actual number of spaces is not an issue (however, fun fact, almost all of my highlights have 2 spaces indents, even those taken from bullet points 🤔). Anyway, it seems like I managed to workaround the bug by sacrificing newlines.
So, for example, the rendered highlight from your example will look like that:
> [!QUOTE]
> Chapter 1 introduces the terminology and approach
that we’re going to use throughout this book. It examines what we actually mean by
words like reliability, scalability, and maintainability, and how
we can try to achieve these goals.
![](https://private-user-images.githubusercontent.com/16765690/345641507-ee9b5423-e6ca-4fba-ac1f-d65c6b844890.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMTk1MzEsIm5iZiI6MTcyMjAxOTIzMSwicGF0aCI6Ii8xNjc2NTY5MC8zNDU2NDE1MDctZWU5YjU0MjMtZTZjYS00ZmJhLWFjMWYtZDY1YzZiODQ0ODkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDE4NDAzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyN2I1MzllZTE4ZWNkYjVjZTc4NzhhNjc3NWFjYTBkZTdmZDcwNTZmNWE5ZjBmZjBjOTJlNTYwNTM2YzBkN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.XlbnLQTdijueUTNz1HleYA0-bZAtLWmZwuERBXVkngs)
from obsidian-apple-books-highlights-plugin.
@modatwork Thank you for the feedback and submitting the report. Recently, I stumbled upon a similar behavior with regular highlights, so it's time to fix it 🙃
from obsidian-apple-books-highlights-plugin.
@modatwork I spent some time with this bug and basically, there are two options available:
1 - preserve newlines. The only reasonable way for this option to work (at least, with the current tooling) is to add a tiny bit of HTML to the resulting Markdown file, like this:
Rendered Markdown file:
> [!QUOTE]
> Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>
Sed non risus.
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat.
Preview:
![](https://private-user-images.githubusercontent.com/16765690/344309956-3b98881f-539c-4366-a7c7-afb4d87abe7e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMTk1MzEsIm5iZiI6MTcyMjAxOTIzMSwicGF0aCI6Ii8xNjc2NTY5MC8zNDQzMDk5NTYtM2I5ODg4MWYtNTM5Yy00MzY2LWE3YzctYWZiNGQ4N2FiZTdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDE4NDAzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkNzQzZDRkYTBkMGY3YTAzZTA0MjRjNDc5NDA0MmM5MWMwNDRkYjZjNWE2ZDQxN2IzMzBlMWUyNDkyZmUxYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FR-QLOR9T5tVuPlR4BEJIeI6PAyE6Dh-vdHB7kNQ1TA)
2 - remove newlines. Still an option, the only minor issue is a slight decrease of readability
> [!QUOTE]
> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed non risus.
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat.
![](https://private-user-images.githubusercontent.com/16765690/344316596-30cb22d8-5eb1-40b2-b2ea-f24b9f24aa8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMTk1MzEsIm5iZiI6MTcyMjAxOTIzMSwicGF0aCI6Ii8xNjc2NTY5MC8zNDQzMTY1OTYtMzBjYjIyZDgtNWViMS00MGIyLWIyZWEtZjI0YjlmMjRhYThiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDE4NDAzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwYjZhMTQ1ZThlODhmMzUwYzQ0YTA5NWM3ZTFkMjlkZmJkNjU4YzdkYmEwMWIyNjJjYTM1ZDg1ODQ2NjBlMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eIykrlsFjXPJA2WpN6xmM0G-e_NWj-pUUkxmomiuC0M)
What option you like more? Personally, I feel like adding a tiny bit of HTML won't hurt, as many people use HTML snippets in their Obsidian vaults as well. Plus it will preserve the original structure and won't impact readability.
from obsidian-apple-books-highlights-plugin.
Another option is to add an {{#each}}{{/each}}
syntax for each line of the highlight text. I'm not sure if that's a good idea to add this complexity.
from obsidian-apple-books-highlights-plugin.
Related Issues (16)
- FR: Colored annotations and additional fields to pass to the template HOT 7
- bookTitle formatting
- apostrophe
- Plugin Roadmap HOT 1
- [Bug] ERR_CHILD_PROCESS_STDIO_MAXBUFFER error when trying to import highlights HOT 7
- FR: Ordering Highlights
- FR: Naming of Highlight File HOT 4
- Error console when importing any HOT 8
- Parse error near line 2: no such table: ZAEANNOTATION HOT 3
- Highlights not listed in chronological order as expected. HOT 3
- Cannot install the plugin on Obsidien v1.6.5 HOT 3
- Issue with Template Import HOT 2
- Refactor: make helper functions more universal/modular HOT 6
- [Enhancement]: When backups are disabled, content overwrite during subsequent imports is not obvious HOT 4
- [Tests: e2e]:Add basic end-to-end tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-apple-books-highlights-plugin.