Quote:
Originally Posted by Quoth
Is a note added if you annotate/edit?
Is it in the list?
|
If I highlight parts of these code blocks, I get the regular popup confirmation with the option "Undo Highlight" but the highlight then disappears when I click somewhere else and doesn't show up in my list. Similarly, if I add a note with code selected, I get a popup saying "Note saved successfully" but it doesn't show up in my notes regardless of filter (All, Highlights, Notes).
There are no issues with highlights or notes of regular text, only code.
---
Clicking on "Edit" in Calibre tells me that the issues seem to be with this:
Code:
<figure class="code" dir="ltr">
<figcaption>src/App.jsx</figcaption>
<div class="highlight"><pre><code></code><code class="uil">import * as React from 'react';
</code><code class="uil">
</code><code class="uil">function App() {
</code><code class="uil"> return (
</code><code class="uil"> <div>
</code><code class="uil"> <h1>Hello React</h1>
</code><code class="uil"> </div>
</code><code class="uil"> );
</code><code class="uil">}
</code><code class="uil">
</code><code class="uil">export default App;
</code></pre>
</div>
</figure>
as well as inline text like this:
Code:
In order to make it work, you have to execute <code>npm run build</code> before running <code>npm run preview</code>.
---
I noted now that these books were transferred using the Calibre plugin KoboTouchExtended. I tried disabling the plugin and transferred the books again. It results in code syntax showing up as regular inline text with regular font but it also seems to solve the issue.
So I would assume that Kobo can't highlight text using the <code> tag which standard Calibre solves by just stripping it, messing up the layout and style. But now, after fiddling around with the fonts, it suddenly seems to be able to highlight inline use of the <code>. But not anything in big code blocks.