Skip to content

Commit

Permalink
Simplify the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
huangsam committed Apr 22, 2024
1 parent 3711dd8 commit 6a259bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
8 changes: 0 additions & 8 deletions .editorconfig

This file was deleted.

Expand Up @@ -60,9 +60,8 @@ public SourceFilePage(final ISourceNode sourceFileNode,

@Override
protected void content(final HTMLElement body) throws IOException {
final SourceHighlighter highlighter;
highlighter = new SourceHighlighter(context.getLocale());
highlighter.render(body, getNode(), sourceReader);
final SourceHighlighter hl = new SourceHighlighter(context.getLocale());
hl.render(body, getNode(), sourceReader);
sourceReader.close();
}

Expand All @@ -77,9 +76,8 @@ protected void head(final HTMLElement head) throws IOException {

@Override
protected String getOnload() {
String setTabWidth = format("window['PR_TAB_WIDTH']=%d", tabWidth);
String invokePrettyPrint = "prettyPrint()";
return setTabWidth + ";" + invokePrettyPrint;
return format("window['PR_TAB_WIDTH']=%d;prettyPrint()",
Integer.valueOf(tabWidth));
}

@Override
Expand Down
Expand Up @@ -77,6 +77,9 @@ public final class Styles {
/** Block of source code */
public static final String SOURCE = "source";

/** Line number before each source line */
public static final String NR = "nr";

/** Part of source code where instructions are not covered */
public static final String NOT_COVERED = "nc";

Expand Down

0 comments on commit 6a259bf

Please sign in to comment.