diff options
Diffstat (limited to 'spec/_layouts')
-rw-r--r-- | spec/_layouts/default.yml | 21 | ||||
-rw-r--r-- | spec/_layouts/toc.yml | 4 |
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> |