mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Explain recursive common fragments edge case (#2183)
This commit is contained in:
@@ -319,11 +319,25 @@ The `common` field is used to configure selector fragments that can be reference
|
||||
common:
|
||||
$infoPiece: //div[@class="infoPiece"]/span
|
||||
performer:
|
||||
Measurements: $infoPiece[text() = 'Measurements:']/../span[@class="smallInfo"]
|
||||
Measurements: $infoPiece[text() = 'Measurements:']/../span[@class="smallInfo"]
|
||||
```
|
||||
|
||||
The `Measurements` xpath string will replace `$infoPiece` with `//div[@class="infoPiece"]/span`, resulting in: `//div[@class="infoPiece"]/span[text() = 'Measurements:']/../span[@class="smallInfo"]`.
|
||||
|
||||
> **⚠️ Note:** Recursive common fragments are **not** supported.
|
||||
Referencing a common fragment within another common fragment will cause an error. For example:
|
||||
```yaml
|
||||
common:
|
||||
$info: //div[@class="info"]
|
||||
# Referencing $info in $models will cause an error
|
||||
$models: $info/a[@class="model"]
|
||||
scene:
|
||||
Title: $info/h1
|
||||
Performers:
|
||||
Name: $models
|
||||
URL: $models/@href
|
||||
```
|
||||
|
||||
### Post-processing options
|
||||
|
||||
Post-processing operations are contained in the `postProcess` key. Post-processing operations are performed in the order they are specified. The following post-processing operations are available:
|
||||
|
||||
Reference in New Issue
Block a user