Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed May 6, 2019
1 parent 75d3ca3 commit 2db6403
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/org/jabref/gui/preview/PreviewViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,27 @@ public class PreviewViewer extends ScrollPane implements InvalidationListener {

private static final Logger LOGGER = LoggerFactory.getLogger(PreviewViewer.class);

private static final String JS_HIGHLIGHT_FUNCTION = " <script type=\"text/javascript\">\r\n" +
" function highlight(text) {\r\n" +
" var innertxt = document.body.innerText;\r\n" +
" var response = innertxt.replace(new RegExp(text, 'gi'), str => `<span style='background-color:red'>${str}</span>`);\r\n" +
" document.body.innerHTML = response;\r\n" +
" }\r\n" +
" </script>";

private final ClipBoardManager clipBoardManager;
private final DialogService dialogService;

private final TaskExecutor taskExecutor = Globals.TASK_EXECUTOR;
private final WebView previewView;
private PreviewLayout layout;

/**
* The entry currently shown
*/
private Optional<BibEntry> entry = Optional.empty();
private BibDatabaseContext database;

private static String JS_HIGHLIGHT_FUNCTION = " <script type=\"text/javascript\">\r\n" +
" function highlight(text) {\r\n" +
" var innertxt = document.body.innerText;\r\n" +
" var response = innertxt.replace(new RegExp(text, 'gi'), str => `<span style='background-color:red'>${str}</span>`);\r\n" +
" document.body.innerHTML = response;\r\n" +
" }\r\n" +
" </script>";

/**
* @param database Used for resolving strings and pdf directories for links.
*/
Expand Down

0 comments on commit 2db6403

Please sign in to comment.