Skip to content

Commit

Permalink
Refactor magic string (JabRef#11700)
Browse files Browse the repository at this point in the history
  • Loading branch information
subhramit authored Sep 3, 2024
1 parent b186efb commit 419d2a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void insertBibliography(XTextCursor cursor, CitationStyle selectedStyle,

OOText title = OOFormat.paragraph(OOText.fromString(CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_TITLE), CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_HEADER_PARAGRAPH_FORMAT);
OOTextIntoOO.write(document, cursor, OOText.fromString(title.toString()));
OOText ooBreak = OOFormat.paragraph(OOText.fromString(""), "Body Text");
OOText ooBreak = OOFormat.paragraph(OOText.fromString(""), CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT);
OOTextIntoOO.write(document, cursor, ooBreak);

String style = selectedStyle.getSource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class CSLFormatUtils {
public static final String DEFAULT_BIBLIOGRAPHY_TITLE = "References";
public static final String DEFAULT_BIBLIOGRAPHY_HEADER_PARAGRAPH_FORMAT = "Heading 2";

public static final String DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT = "Body Text";

public static final CitationStyleOutputFormat OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");

Expand Down

0 comments on commit 419d2a7

Please sign in to comment.