• Nick Stenning's avatar
    Fix missing PDF highlights · 8f4cc121
    Nick Stenning authored
    fda63b4 unfortunately broke highlighting in PDFs, because the PDF
    anchoring code first finds the text in the document, and then uses a
    TextPositionSelector and the HTML anchoring code to select a range in
    the rendered page for highlighting.
    
    This commit fixes that issue by moving the TextQuoteSelector check up a
    level into `Guest#anchor`.
    
    I've added two tests for this in `guest-test.coffee` -- one tests that
    annotations where the target contains no TextQuoteSelector are marked as
    orphans, and the second tests that the low-level anchoring code is never
    called in this case.
    
    I have also removed the integration test, on the basis that I don't
    think integration testing failure cases is a good habit to get into.
    
    Fixes #3530.
    8f4cc121
Name
Last commit
Last update
..
anchoring Loading commit data...
plugin Loading commit data...
test Loading commit data...
adder.html Loading commit data...
adder.js Loading commit data...
config.js Loading commit data...
guest.coffee Loading commit data...
highlighter.coffee Loading commit data...
host.coffee Loading commit data...
main.js Loading commit data...
pdf-sidebar.coffee Loading commit data...
range-util.js Loading commit data...
selections.js Loading commit data...
sidebar.coffee Loading commit data...