Skip to content

Fix "Protected Terms" formatting #10415

Closed
@koppor

Description

Test bib:

@Article{demo,
  title  = {BPMN4TOSCA rocks in BPMN and TOSCA},
}
  1. Enable custom list "custom" in the preferences. Result:
    image
  2. Open the entry editor of demo entry. Navigate to the title field.
  3. Place the cursor to the beginning of BPMN4TOSCA.
  4. Right click - go to Protected terms - Add selected text to list. (nothing can be selected)
    image
  5. Double click on BPMN4TOSCA
  6. Add to list
    image
  7. List has space at the end
    image
  8. Add BPMN (using a double click)
  9. Add TOSCA (using a double click)
  10. Execute "Protect terms"
    image
  11. Result: {}{BPMN}{}4TOSCA rocks in {}{BPMN}{} and {}{TOSCA}{}
  12. Modify demo.terms manually: Remove spaces at the end.
    236204305-8df041d9-c32b-4825-b5da-de64f8bef635
  13. Execute "Protect Terms"
  14. Result: {}{BPMN}{}4TOSCA rocks in {}{BPMN}{} and {}{TOSCA}{}

These points have to be fixed:

  • Step 4: It should be possible to add the term to current word to the list - even if nothing is selected. A right click and then "Add text to selected list" should simply add the current word to the list
  • Step 6: The selected text should be trimmed
  • Step 14: There should be no {} contained. --> {BPMN4TOSCA} rocks in {BPMN} and {TOSCA}
  • In general, longer terms should be treated first (to avoid substring issues)
  • Reiterating on "Format field" should not lead to multiple {}: {}{}{}{}{}{}{}{BPMN}{}{}{}{}{}{}{}4TOSCA rocks in {}{}{}{}{}{}{}{BPMN}{}{}{}{}{}{}{} and {}{}{}{}{}{}{}{TOSCA}{}{}{}{}{}{}{}

Also add test cases.

Metadata

Assignees

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions