Skip to content

Commit

Permalink
Fixed tests remaining from bibtexkey to citationkey refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Sep 16, 2020
1 parent babad78 commit a2fba90
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/main/java/org/jabref/logic/help/HelpFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ public enum HelpFile {
AUTOSAVE("general/autosave"),
// The help page covers both OO and LO.
OPENOFFICE_LIBREOFFICE("import-export/openofficeintegration"),
FETCHER_ACM("import-using-online-bibliographic-database/acmportal"),
FETCHER_ADS("import-using-online-bibliographic-database/ads"),
FETCHER_ACM("collect/import-using-online-bibliographic-database#acmportal"),
FETCHER_ADS("collect/import-using-online-bibliographic-database#ads"),
FETCHER_BIBSONOMY_SCRAPER(""),
FETCHER_CITESEERX("import-using-online-bibliographic-database/citeseer"),
FETCHER_DBLP("import-using-online-bibliographic-database/dblp"),
FETCHER_CITESEERX("collect/import-using-online-bibliographic-database#citeseer"),
FETCHER_DBLP("collect/import-using-online-bibliographic-database#dblp"),
FETCHER_DIVA("collect/add-entry-using-an-id"),
FETCHER_DOAJ("import-using-online-bibliographic-database/doaj"),
FETCHER_DOAJ("collect/import-using-online-bibliographic-database#doaj"),
FETCHER_DOI("collect/add-entry-using-an-id"),
FETCHER_GOOGLE_SCHOLAR("import-using-online-bibliographic-database/googlescholar"),
FETCHER_GVK("import-using-online-bibliographic-database/gvk"),
FETCHER_IEEEXPLORE("import-using-online-bibliographic-database/ieeexplore"),
FETCHER_INSPIRE("import-using-online-bibliographic-database/inspire"),
FETCHER_GOOGLE_SCHOLAR("collect/import-using-online-bibliographic-database#googlescholar"),
FETCHER_GVK("collect/import-using-online-bibliographic-database#gvk"),
FETCHER_IEEEXPLORE("collect/import-using-online-bibliographic-database#ieeexplore"),
FETCHER_INSPIRE("collect/import-using-online-bibliographic-database#inspire"),
FETCHER_ISBN("collect/add-entry-using-an-id"),
FETCHER_MEDLINE("import-using-online-bibliographic-database/medline"),
FETCHER_OAI2_ARXIV("import-using-online-bibliographic-database/arxiv"),
FETCHER_MEDLINE("collect/import-using-online-bibliographic-database#medline"),
FETCHER_OAI2_ARXIV("collect/import-using-online-bibliographic-database#arxiv"),
FETCHER_RFC("collect/add-entry-using-an-id"),
FETCHER_SPRINGER("import-using-online-bibliographic-database/springer"),
FETCHER_SPRINGER("collect/import-using-online-bibliographic-database#springer"),
FETCHER_TITLE("collect/add-entry-using-an-id"),
FETCHER_SCIENCEDIRECT(""),
DATABASE_PROPERTIES("setup/databaseproperties"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,18 @@ private static void migrateTypedKeyPrefs(JabRefPreferences prefs, Preferences ol

static void upgradePreviewStyleFromReviewToComment(JabRefPreferences prefs) {
String currentPreviewStyle = prefs.getPreviewStyle();
String migratedStyle = currentPreviewStyle.replace("\\begin{review}<BR><BR><b>Review: </b> \\format[HTMLChars]{\\review} \\end{review}", "\\begin{comment}<BR><BR><b>Comment: </b> \\format[HTMLChars]{\\comment} \\end{comment}");
String migratedStyle = currentPreviewStyle.replace("\\begin{review}<BR><BR><b>Review: </b> \\format[HTMLChars]{\\review} \\end{review}", "\\begin{comment}<BR><BR><b>Comment: </b> \\format[HTMLChars]{\\comment} \\end{comment}")
.replace("<b><i>\\bibtextype</i><a name=\"\\bibtexkey\">\\begin{bibtexkey} (\\bibtexkey)</a>", "<b><i>\\bibtextype</i><a name=\"\\citationkey\">\\begin{citationkey} (\\citationkey)</a>")
.replace("\\end{bibtexkey}</b><br>__NEWLINE__", "\\end{citationkey}</b><br>__NEWLINE__");
prefs.setPreviewStyle(migratedStyle);
}

static void upgradePreviewStyleAllowMarkdown(JabRefPreferences prefs) {
String currentPreviewStyle = prefs.getPreviewStyle();
String migratedStyle = currentPreviewStyle.replace("\\format[HTMLChars]{\\comment}", "\\format[Markdown,HTMLChars]{\\comment}");
String migratedStyle = currentPreviewStyle.replace("\\format[HTMLChars]{\\comment}", "\\format[Markdown,HTMLChars]{\\comment}")
.replace("<b><i>\\bibtextype</i><a name=\"\\bibtexkey\">\\begin{bibtexkey} (\\bibtexkey)</a>", "<b><i>\\bibtextype</i><a name=\"\\citationkey\">\\begin{citationkey} (\\citationkey)</a>")
.replace("\\end{bibtexkey}</b><br>__NEWLINE__", "\\end{citationkey}</b><br>__NEWLINE__");

prefs.setPreviewStyle(migratedStyle);
}

Expand Down

0 comments on commit a2fba90

Please sign in to comment.