-
-
Notifications
You must be signed in to change notification settings - Fork 5
SF-3629 Add support for links with titles #3557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3557 +/- ##
==========================================
+ Coverage 82.90% 82.91% +0.01%
==========================================
Files 605 605
Lines 36974 36996 +22
Branches 6058 6038 -20
==========================================
+ Hits 30652 30675 +23
Misses 5408 5408
+ Partials 914 913 -1 ☔ View full report in Codecov by Sentry. |
eca0519 to
5feef53
Compare
RaymondLuong3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working well in my testing. Send receive seems to accurately get the content if edits are made around the new link blot. I followed the acceptance tests and could not find any issues
@RaymondLuong3 reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @pmachapman)
src/SIL.XForge.Scripture/ClientApp/src/app/shared/text/quill-editor-registration/quill-formats/quill-blots.spec.ts line 366 at r1 (raw file):
}); it('should set title from contents ignoring an link with no text', () => {
Nit: typo
Code quote:
ignoring an link src/SIL.XForge.Scripture/usx-sf.rnc line 433 at r1 (raw file):
char.link = attribute link-href { xsd:string { pattern = "(.*///?(.*/?)+)|((prj:[A-Za-z\-0-9]{3,8} )?[A-Z1-4]{3} \d+:\d+(\-\d+)?[ ]*)|(#[^\s]+)" } }?, # The resource being linked to as a URI
Why is this needed? Are there sometimes whitespace at the end of the href?
Code quote:
?[ ]*)
5feef53 to
055a46f
Compare
pmachapman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 9 files reviewed, 1 unresolved discussion (waiting on @RaymondLuong3)
src/SIL.XForge.Scripture/usx-sf.rnc line 433 at r1 (raw file):
Previously, RaymondLuong3 (Raymond Luong) wrote…
Why is this needed? Are there sometimes whitespace at the end of the href?
Yes. Because the USFM is in the format \+xt see verse 20|GEN 2:20\+xt*, sometimes users when typing this out in Paratext will leave a space at the end, i.e. \+xt see verse 20|GEN 2:20 \+xt*. PT has no issue using the cross reference in this case, so I thought the best way is just to allow it.
src/SIL.XForge.Scripture/ClientApp/src/app/shared/text/quill-editor-registration/quill-formats/quill-blots.spec.ts line 366 at r1 (raw file):
Previously, RaymondLuong3 (Raymond Luong) wrote…
Nit: typo
Done. Thanks!
055a46f to
5b8787c
Compare
This PR adds support for the links with titles, which in Paratext are generated as
<link>elements, not the usual<char>element that links without titles are created as. These are used in footnotes and introductions of some translations, particularly the NIV2011.This change is