summaryrefslogtreecommitdiff
path: root/spec/_layouts
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-09-19 09:59:56 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-09-19 09:59:56 +1000
commit379dbb0f6aa1d2d1233771a2dccec6c2dc584222 (patch)
tree1a2325793f329e71f91aedc094f3f0ebf73fe939 /spec/_layouts
parent79f59c5330122ee1ff1bac833bc77feca81d49af (diff)
parentd24ad908451e42925fe6be9995235bf2b4de1b39 (diff)
downloadscala-379dbb0f6aa1d2d1233771a2dccec6c2dc584222.tar.gz
scala-379dbb0f6aa1d2d1233771a2dccec6c2dc584222.tar.bz2
scala-379dbb0f6aa1d2d1233771a2dccec6c2dc584222.zip
Merge pull request #3984 from gourlaysama/wip/spec
General formatting improvements in the spec
Diffstat (limited to 'spec/_layouts')
-rw-r--r--spec/_layouts/default.yml21
-rw-r--r--spec/_layouts/toc.yml4
2 files changed, 21 insertions, 4 deletions
diff --git a/spec/_layouts/default.yml b/spec/_layouts/default.yml
index d3296c6f5d..f78232f461 100644
--- a/spec/_layouts/default.yml
+++ b/spec/_layouts/default.yml
@@ -13,19 +13,36 @@
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+ <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/default.min.css">
+ <script src="public/highlight/highlight.pack.js"></script>
<!-- need to use include to see value of page.chapter variable -->
<style type="text/css">
{% include numbering.css %}
+
+ /* proper rendering of MathJax into highlighted code blocks */
+ .fixws { white-space: pre; }
+ .fixws .math { white-space: nowrap; }
</style>
<script type="text/javascript">
// clear content of H3 nodes that start with "Example:"
// the content is only there to determine ID of the H3 element (redcarpet doesn't let us set css id)
$( document ).ready(function(){ $("h3[id*='example']").text("") })
+
+ // no language auto-detect so that EBDF isn't detected as scala
+ hljs.configure({
+ languages: []
+ });
+
+ // syntax highlighting after mathjax is loaded so that mathjax can be used in code blocks
+ MathJax.Hub.Queue(function () {
+ hljs.initHighlighting();
+ $("pre nobr").addClass("fixws");
+ })
</script>
<link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css">
-
+ <title>{{ page.title }}</title>
</head>
<body>
@@ -33,4 +50,4 @@
{{ content }}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/spec/_layouts/toc.yml b/spec/_layouts/toc.yml
index d77ea62a19..85e1e6bc5c 100644
--- a/spec/_layouts/toc.yml
+++ b/spec/_layouts/toc.yml
@@ -4,7 +4,7 @@
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css">
-
+ <title>{{ page.title }}</title>
</head>
<body>
@@ -12,4 +12,4 @@
{{ content }}
</body>
-</html> \ No newline at end of file
+</html>