Fix 11102 by allowing users to add local bst files to preview layout list#11234
Conversation
|
No need to close the PR and reopen. Just continue committing and pushing. The PR will be updated automatically |
I am not quite sure I understand you correctly, but the BstPreviewLayout itself already handles the bstVm:, so it should work out of the box jabref/src/main/java/org/jabref/logic/bst/BstPreviewLayout.java Lines 44 to 54 in 94bc5c2 |
|
@Siedlerchr thanks I didn't really understand the mechanism of updating pull request (i.e. just committing to my branch automatically updates the pr and runs tests again. |
|
Thanks for the PR! We refactored the code a bit and found an issue with the BST rendering itself, (not your fault, but we would like to continue here, so please leave the PR open). |
|
Intermediate result:
|
|
Tested some other styles that work: https://raw.githubusercontent.com/CarlOrff/apalike-german/master/apalike-german.bst interestingly, the IEEEtr.bst from the base style sworks as well |
|
Current state: The Maybe, the whole new interpretation mixes up parsing of the Other than that, I find following code strange - this seems to mix parsing and execution @Override
public Integer visitBstFunction(BstParser.BstFunctionContext ctx) {
String name = ctx.getChild(0).getText();
if (bstVMContext.functions().containsKey(name)) {
LOGGER.trace("Function '{}' found", name);
bstVMContext.functions().get(name).execute(this, ctx, selectedBstEntry);
} else {
LOGGER.trace("Function '{}' not found", name);
visit(ctx.getChild(0));
}
return BstVM.TRUE;
} |
|
Strange git error: Pushed to |
|
something with git lfs stuff |
|
We identified that there is an endless loop happening in following bst function % Converts all single dashes "-" to double dashes "--".
FUNCTION {n.dashify}
{ large.number.separate
't :=
""
{ t empty$ not }
{ t #1 #1 substring$ "-" =
{ t #1 #2 substring$ "--" = not
{ "--" *
t #2 global.max$ substring$ 't :=
}
{ { t #1 #1 substring$ "-" = }
{ "-" *
t #2 global.max$ substring$ 't :=
}
while$
}
if$
}
{ t #1 #1 substring$ *
t #2 global.max$ substring$ 't :=
}
if$
}
while$
}(And we fixed the lookup) |
* upstream/main: Fix BSTVM (JabRef#11304) # Conflicts: # src/main/java/org/jabref/logic/bst/BstVM.java # src/main/java/org/jabref/logic/bst/BstVMVisitor.java # src/test/java/org/jabref/logic/bst/BstVMTest.java
Fix NPE add preview to chosen
|
Storing in the prefs now works as well |
add to layout cycle Apply some intellij logger suggestions
I've tried to fix #11102 by adding a button which may be used to add the selected bst files to the available styles and tested it to work although I think for preview to function well bstvm should be used not sure how. Would like some guidance . After it works as expected may be documentation can be modified.
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)