Style classes wrongly reported as 0 (unused)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Calibre 5.33.1 Windows 10 latest, x64.
In a book I'm formatting, 'calibre-editor' reports a class as unused when reports are being generated. I'm including a screenshot. Basically it shows "[0] poetry", like it is an unused class, but it can be expanded and shows all occurrences, which is weird because... well, it looked like the number of occurrences is 0.
Most, if not all XHTML files have the following code:
<div class="poetry">
<p>Text.</p>
<p>More text.</p>
<p>Etc...</p>
</div>
The report tool actually report these usages when the '[0] poetry' entry is expanded.
The reason is that in the CSS the class is used like this:
.poetry p {
}
This is by design, because the <p> inside those <div class="poetry"> need different styling.
IMHO, the class should be marked as used, since expanding it shows usage, it is weird to have something marked as "[0]" only to see a lot of occurrences when expanding it.
Thanks in advance, if you need more information let me know.
Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.
status fixreleased