Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3805: dash correctly terminates commands in layout files #4137

Merged
merged 4 commits into from
Jun 29, 2018

Conversation

tobiasdiez
Copy link
Member

@tobiasdiez tobiasdiez commented Jun 17, 2018

Fixes #3805. Now commands terminated by a hyphen (like \edition-) work correctly.

Way back in 2011, Morten added the extra check for hyphens (commit 392bc7a). However, I'm not aware of any field that has a dash in it, so I'm not sure what was the reason for the change (I couldn't find an old bug report).

Also refactored a bit the layout tests.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 17, 2018
@stefan-kolb stefan-kolb requested a review from koppor June 19, 2018 06:37
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides micro comments: LGTM

CHANGELOG.md Outdated
@@ -31,6 +31,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where in rare cases entries where overlayed in the main table. https://github.com/JabRef/jabref/issues/3281
- We fixed an issue where selecting a group messed up the focus of the main table / entry editor. https://github.com/JabRef/jabref/issues/3367
- We fixed an issue where composite author names were sorted incorrectly. https://github.com/JabRef/jabref/issues/2828
- We fixed an issue where commands followed by `-` didn't worked. [#3805](https://github.com/JabRef/jabref/issues/3805)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change "worked" into "work".

@@ -33,7 +33,7 @@ public Layout(List<StringInt> parsedEntries, LayoutFormatterPreferences prefs) {
for (StringInt parsedEntry : parsedEntries) {
switch (parsedEntry.i) {
case LayoutHelper.IS_LAYOUT_TEXT:
case LayoutHelper.IS_SIMPLE_FIELD:
case LayoutHelper.IS_SIMPLE_COMMAND:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check tabs vs. spaces there and the line before/after

@@ -109,7 +109,7 @@ public LayoutEntry(StringInt si, LayoutFormatterPreferences prefs) {
case LayoutHelper.IS_LAYOUT_TEXT:
text = si.s;
break;
case LayoutHelper.IS_SIMPLE_FIELD:
case LayoutHelper.IS_SIMPLE_COMMAND:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra indent? (applies for all case statements in this file)

@LinusDietz LinusDietz merged commit cf9fbb0 into master Jun 29, 2018
@LinusDietz LinusDietz deleted the fix3805 branch June 29, 2018 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants