Bug 403247

Summary: Markdown backend: hyperlinks across multiple lines don't work
Product: [Applications] okular Reporter: destroyer2880
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, nate
Priority: NOR    
Version: 1.6.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 19.04.0
Attachments: Okular Link Test

Description destroyer2880 2019-01-15 18:54:12 UTC
SUMMARY
With Okular's markdown backend, hyperlinks that are broken into multiple lines due to formatting appear as they should but are not clickable.

STEPS TO REPRODUCE
1. Open a markdown file in Okular that has hyperlinks with long names.
2. Find a hyperlink that starts on one line and ends on another.
3. Hover over said hyperlink.

OBSERVED RESULT
Hyperlink will not be clickable.

EXPECTED RESULT
Hyperlink should be clickable.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 4.20.1-arch1-1-ARCH
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.12.0
Comment 1 Albert Astals Cid 2019-01-15 21:32:53 UTC
Can you attach such a file?
Comment 2 destroyer2880 2019-01-16 14:44:45 UTC
Created attachment 117489 [details]
Okular Link Test

I have created an example markdown file containing a link that works for me and a link that doesn't work for me.
Comment 3 Albert Astals Cid 2019-01-16 18:06:06 UTC
Yep
Comment 4 Albert Astals Cid 2019-01-16 19:47:54 UTC
https://phabricator.kde.org/D18303
Comment 5 Albert Astals Cid 2019-01-28 21:09:37 UTC
Git commit 27b76ee7c035b9f16452c56aa3ab997948ecfc7e by Albert Astals Cid.
Committed on 28/01/2019 at 21:09.
Pushed by aacid into branch 'master'.

TextDocumentGenerator: Support links that span more than one line

Summary:
If a link spans more than one line we need one rect for each of the lines

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D18303

M  +13   -0    core/area.cpp
M  +11   -0    core/area.h
M  +16   -7    core/textdocumentgenerator.cpp
M  +61   -0    core/textdocumentgenerator_p.h

https://commits.kde.org/okular/27b76ee7c035b9f16452c56aa3ab997948ecfc7e