Skip to content

Instantly share code, notes, and snippets.

@bdelacretaz
Created June 28, 2017 18:48
Show Gist options
  • Save bdelacretaz/ef1c1b041dce73170ecd509fbc2d08ef to your computer and use it in GitHub Desktop.
Save bdelacretaz/ef1c1b041dce73170ecd509fbc2d08ef to your computer and use it in GitHub Desktop.
Experimenting with https://highlightjs.org/
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<h1>Some Java</h1>
<pre><code>
public class Result implements Iterable <ResultLog.Entry> {
public boolean isOk() {
return getStatus().equals(Status.OK);
}
public Status getStatus() {
return resultLog.getAggregateStatus();
}
@Override
public Iterator<ResultLog.Entry> iterator() {
return resultLog.iterator();
}
... details omitted
}
</code></pre>
<h1>Some XML</h1>
<pre><code>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;p:pipeline xmlns:p="http://www.w3.org/ns/xproc"&gt;
&lt;p:xslt&gt;
&lt;p:input port="stylesheet"&gt;
&lt;p:document href="/apps/xproc/one.xsl"/&gt;
&lt;/p:input&gt;
&lt;/p:xslt&gt;
&lt;p:xslt&gt;
&lt;p:input port="stylesheet"&gt;
&lt;p:document href="/apps/xproc/two.xsl"/&gt;
&lt;/p:input&gt;
&lt;/p:xslt&gt;
&lt;/p:pipeline&gt;
</code></pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment