Fix glossary-plain and glossary-plain-no-dictionary not working when Result grouping mode == No grouping#2252
Conversation
…resultOutputMode (Result grouping mode) == split (No grouping)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {{~#unless (op "&&" selectedDictionary (op "!=" selectedDictionary definition.dictionary))~}} | ||
| {{~#unless noDictionaryTag~}} | ||
| ({{definition.dictionaryAlias}})<br> | ||
| {{~/unless~}} | ||
| {{#each glossary}}{{{formatGlossaryPlain ../dictionary .}}}{{#unless @last}}<br>{{/unless}}{{/each}}{{#unless @last}}<br>{{/unless}} | ||
| {{#each definition.glossary}}{{{formatGlossaryPlain ../definition.dictionary .}}}{{/each}} |
There was a problem hiding this comment.
Separate glossary items in no-grouping output
In the new glossary-plain branch for the No grouping mode we iterate definition.glossary without adding any separator, so multiple glossary entries are concatenated (e.g., results now render da definition 1da definition 2). The grouped branch still inserts <br> between entries, so the plain output for ungrouped results no longer matches prior formatting and merges senses together when a definition has more than one glossary line.
Useful? React with 👍 / 👎.
When on
No grouping,definition.definitionsdoes not exist.definitionis a single definition not an object. Normal glossary handlebars already account for this but it got skipped over forglossary-plain.