• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright Louis Dionne 2013-2017
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5// We parse the code snippets and italicize the words from the pseudo-code
6// glossary to make them stand out. We also link them to their respective
7// definition in the glossary.
8window.onload = function() {
9  $(".fragment").children(".line").each(function(index, div) {
10    div.innerHTML = div.innerHTML
11      .replace(/perfect-.+(?=])/g, "perfect-capture".link("index.html#tutorial-glossary-perfect_capture").italics())
12      .replace(/forwarded/g, "forwarded".link("index.html#tutorial-glossary-forwarded").italics())
13      .replace(/tag-dispatched/g, "tag-dispatched".link("index.html#tutorial-glossary-tag_dispatched").italics())
14      .replace(/implementation_defined/g, "implementation-defined".link("index.html#tutorial-glossary-implementation_defined").italics())
15      .replace(/see-documentation/g, "see-documentation".italics());
16  });
17
18  $(".benchmark-chart").each(function(index, div) {
19    var dataset = div.getAttribute("data-dataset");
20    $.getJSON("benchmarks/release/clang-7.1.0/" + dataset, function(options) {
21      Hana.initChart($(div), options);
22    });
23  });
24};
25