mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
## Description Adds line block markup to example substitutions in the plugin documentation, so that each case is shown on a separate line: > The replacement can be an expression utilising the matched regex, allowing us to create more general rules. Say for example, we want to sort all albums by multiple artists into the directory of the first artist. We can thus capture everything before the first ,, `` &`` or `` and``, and use this capture group in the output, discarding the rest of the string. > > ```yaml > substitute: > ^(.*?)(,| &| and).*: \1 > ``` > > This would handle all the below cases in a single rule: > >> Bob Dylan and The Band -> Bob Dylan >> Neil Young & Crazy Horse -> Neil Young >> James Yorkston, Nina Persson & The Second Hand Orchestra -> James Yorkston |
||
|---|---|---|
| .. | ||
| _static | ||
| _templates/autosummary | ||
| api | ||
| dev | ||
| guides | ||
| plugins | ||
| reference | ||
| .gitignore | ||
| changelog.rst | ||
| code_of_conduct.rst | ||
| conf.py | ||
| contributing.rst | ||
| faq.rst | ||
| index.rst | ||
| Makefile | ||
| modd.conf | ||
| team.rst | ||