Notalib / LYT

m.e17.dk
GNU Lesser General Public License v3.0
10 stars 12 forks source link

Fix highlighting of MTM books #694

Closed saebekassebil closed 8 years ago

saebekassebil commented 8 years ago

Fixes NOTA-2285

Some MTM books have content in the following format: <p> -> <span> -> <a> -> Text for each paragraph. We use: <p> -> <a> -> Text

Problem is, that our books don't use the span element inside, and so we don't highlight their books properly. This fixes it, by assuming all books have a containing <p> element for each paragraph, and then highlighting the containing <p> element, even if that is not the element being referenced from the SMIL file.. I think all our books have that (at least our stylesheet assume it), but we should probably test this on a few books before pulling.

The problem with the current solution is, that we only assume that <p> elements get referenced from the SMIL files. That is not true. In the case of MTM's books, sometimes it's the contained <span> tag that gets referenced. Because we're using opacity to highlight different tags, we have all <p> tags set to opacity: 0.4 by default, and when they're .active they get a opacity: 1.

@m-abs or @dfg-nota could you take a look at this and see if I'm missing something totally?

saebekassebil commented 8 years ago

Hej @m-abs. Hvad siger du til det her? Det vil fixe sætnings-opmærkning for MTM og vil (så vidt jeg kan teste mig til) ikke påvirke vores opmærkning. Egentlig minder de her regler meget om den fra ord-opmærkning.

m-abs commented 8 years ago

@saebekassebil Det ser meget bedre ud. :+1:

saebekassebil commented 8 years ago

@m-abs Super! Skal vi merge så?

saebekassebil commented 8 years ago

Deployed Live