-
Notifications
You must be signed in to change notification settings - Fork 532
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
Workaround for bogus HTML documents (h:#409) #207
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rather than using the presence of a `ranges` property on an annotation to determine whether it is new or updated, track that information via one-shot closures subscribed to the editor events. The proper subscriber registers via the callbacks for adder and annotation edit clicks where it is known for certain if the annotation is new or updated.
… target/selector, instead of range)
- Went from using ranges to using targets, which have selectors. - Added support for generating "xpath range", "position" and "context quote" selectors. (Some of them contain some fake data.)
- Don't publish event after trying to load annotations, when nothing is found - When trying to find anchor based on the XPath range selector, verify the quote, if available
- Added fuzzy matching strategy
…ator into fuzzy-anchoring
- Renamed some range-related things for more consistency - Added support for handling img title and alt tags Annotator: - Renamed some range-related things for more consistency
…owser differences.) - Add support for showing visual diff of the changed quotes. (Currently only works inside of h.)
Updated to follow API change on dom-text-matcher.
- Moved the init code of the dom-text-* libraries into a separate method, making it possible to omit these libraries when not needed.
… instead of a list
…ext-matcher layer.
- Removed some dead code - Cosmetic changes
Conflicts: src/annotator.coffee
In case our highlights were removed from the DOM somehow, don't remove them again.
…osition in the one-phase fuzzy strategy.
… when something was cut.
… names of the constants. (Better readability) - Added detailed debug information to SerializedRange.normalize - When normalizing a SerializedRange, and looking for the start, don't choose the last position of the previous text element, but the first position of the current one. This avoid adding whitespace by accident.
…gn in them." This reverts commit 0d1ef70, which was unsufficient to solve the problem. Stronger measures have been introduced since this first weak attempt.
Ooops. Wrong branch. Sorry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduced manual XPath construction and evaluation to Annotator,
as a fallback for bogus HTML documents.