Merged
Conversation
Fixes microformats#183. Adds a test based on that issue. Fixes an old test that accidentally tests for the child microformats case.
gRegorLove
reviewed
Aug 7, 2018
Member
gRegorLove
left a comment
There was a problem hiding this comment.
Looks good, just the one line-comment.
Mf2/Parser.php
Outdated
| ); | ||
| foreach ($xpaths as $xpath) { | ||
| $url = $this->xpath->query($xpath, $e); | ||
| if ($url->length === 1) { |
Member
There was a problem hiding this comment.
Only suggested change is if ($url !== false && $url->length === 1)
This file contains hidden or 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
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.
Fixes #183.
This takes inspiration from how photo parsing is handled. Basically we convert the semi-CSS selectors used in the parsing specification to XPath selectors.
Adds
ParseImpliedTest::testNoImpliedUrlbased on the case in #183. This should probably be given a better name, but I am drawing blanks.Fixes
ClassicMicroformatsTest::testMixedMf2andMf1Case3. This test was assuming aurlproperty, but it no longer gets it because it has a nested microformat. At least I think this is right… Is it?