You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have RemoveBracesFormatter, which removes the outer braces. See org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatterTest for examples.
We have org.jabref.model.entry.Author#removeStartAndEndBraces, which also removes inner braces enclosing complete words:
{Vall{\'e}e} {Poussin} -> Vall{\'e}e Poussin <-- here, {Poussin} is changed to Poussin. This is not available to users (in the cleanup entry dialogue)
{Vall{\'e}e Poussin} -> Vall{\'e}e Poussin <-- here, the outer braces are removed
Vall{\'e}e Poussin -> Vall{\'e}e Poussin <-- here, everything is kept as is
We should make this formatter "globally" available:
Rename RemoveBracesFormatter to RemoveEnclosingBracesFormatter.
Also rename all used fields.
Introduce RemoveWordEnclosingAndOuterEnclosingBracesFormatter by moving the code of org.jabref.model.entry.Author#removeStartAndEndBraces to here
Introduce class
Create test cases (similar to RemoveBracesFormatterTest)
Replace call to removeStartAndEndBraces in Author to call to RemoveWordEnclosingAndOuterEnclosingBracesFormatter.format. The RemoveWordEnclosingAndOuterEnclosingBracesFormatter needs to be initialized as class constant in Author
Name the formatter "Remove word enclosing braces"
Use description "Removes braces encapsulating a complete word and the complete field content."
* #11222 fix
* checkstyle fixes
* fixes for unit tests
* Make new RemoveWordEnclosingAndOuterEnclosingBracesFormatter available
* Add more braces to the example input
* Keep original string when formatting empty string
* Fix RemoveWordEnclosingAndOuterEnclosingBracesFormatter in the case of }} at the end
* Fix constant (and empty line)
* Reorder methods
* Add CHANGELOG.md entry
* markdown issue fix
* checkstyle fix
* duplicate keys issue fix
* author class not being initialized fix
* reverting key name change for old formatter
* reverting commit- Keep original string when formatting empty string since it causes unit tests to fail
* minor fixes
* minor fixes
* minor fixes
* fix: rewrite
* formatting fix
---------
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
We have
RemoveBracesFormatter
, which removes the outer braces. See org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatterTest for examples.We have
org.jabref.model.entry.Author#removeStartAndEndBraces
, which also removes inner braces enclosing complete words:{Vall{\'e}e} {Poussin}
->Vall{\'e}e Poussin
<-- here,{Poussin}
is changed toPoussin
. This is not available to users (in the cleanup entry dialogue){Vall{\'e}e Poussin}
->Vall{\'e}e Poussin
<-- here, the outer braces are removedVall{\'e}e Poussin
->Vall{\'e}e Poussin
<-- here, everything is kept as isWe should make this formatter "globally" available:
RemoveBracesFormatter
toRemoveEnclosingBracesFormatter
.RemoveWordEnclosingAndOuterEnclosingBracesFormatter
by moving the code oforg.jabref.model.entry.Author#removeStartAndEndBraces
to hereRemoveBracesFormatterTest
)removeStartAndEndBraces
in Author to call toRemoveWordEnclosingAndOuterEnclosingBracesFormatter.format
. TheRemoveWordEnclosingAndOuterEnclosingBracesFormatter
needs to be initialized as class constant inAuthor
"Remove word enclosing braces"
"Removes braces encapsulating a complete word and the complete field content."
The text was updated successfully, but these errors were encountered: