mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
Merge pull request #1351 from mdarse/facets-strict-match-context-regression
Fix strict facets regressions and add tests
This commit is contained in:
@@ -226,7 +226,7 @@ class QueryVisitor implements Visit
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($node instanceof AST\Context) {
|
if ($node instanceof AST\Context) {
|
||||||
if ($root instanceof ContextAbleInterface) {
|
if ($root instanceof AST\ContextAbleInterface) {
|
||||||
$root = $root->withContext($node);
|
$root = $root->withContext($node);
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception('Unexpected context after non-contextualizable node');
|
throw new \Exception('Unexpected context after non-contextualizable node');
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ foo bar (baz qux)|<text:"foo bar" context:"baz qux">
|
|||||||
[foo (bar)]|<term:"foo" context:"bar">
|
[foo (bar)]|<term:"foo" context:"bar">
|
||||||
[foo bar (baz qux)]|<term:"foo bar" context:"baz qux">
|
[foo bar (baz qux)]|<term:"foo bar" context:"baz qux">
|
||||||
|
|
||||||
|
# Raw string
|
||||||
|
r"foo"|<raw:"foo">
|
||||||
|
r"foo bar"|<raw:"foo bar">
|
||||||
|
r"\"foo\""|<raw:""foo"">
|
||||||
|
r"\o/"|<raw:"\o/">
|
||||||
|
r"\\o/"|<raw:"\o/">
|
||||||
|
r"foo \n bar"|<raw:"foo \n bar">
|
||||||
|
r"foo\\nbar"|<raw:"foo\nbar">
|
||||||
|
|
||||||
# Parenthesis grouping
|
# Parenthesis grouping
|
||||||
(foo)|<text:"foo">
|
(foo)|<text:"foo">
|
||||||
(foo bar)|<text:"foo bar">
|
(foo bar)|<text:"foo bar">
|
||||||
|
|||||||
|
Can't render this file because it contains an unexpected character in line 1 and column 11.
|
Reference in New Issue
Block a user