level: parseInt()

in static/js/com/toc.js [57:118]


        level: parseInt(sectionNode.tagName.substr(1, 1)),
        title: $(sectionNode).text(),
        node: sectionNode,
        content: []
      };
      sections.push(section);
    }
    return sections;
  },

  get: function (options) {
    var that = this;
    var selector = (options && typeof options.selector != 'undefined') ? options.selector : that.selector;
    var scope = (options && typeof options.scope != 'undefined') ? options.scope : that.scope;
    var sectMap, tocList;

    sectMap = that.__getMap(selector, scope);
    if (sectMap.length == 0) {
      return [];
    }

    tocList = that.__getBranch(sectMap, sectMap[0].level, 0);
    return tocList;
  },

  render: function (opts) {
    var that = this;
    var from = (opts && typeof opts.from != 'undefined') ? opts.from : that.from;
    var to = (opts && typeof opts.to != 'undefined') ? opts.to : that.to;
    var target = (opts && typeof opts.target != 'undefined') ? opts.target : null;
    var toc;

    toc = that.__create(that.map, from, to);

    if (target != null) {
      target.appendChild(toc);
    }

    return toc;
  },

  __create: function (list, from, to) {
    var that = this;
    var createLinks = that.createLinks;
    var ul, li, a, title;
    var section, sectionContent;
    var css = that.cssClasses;
    var i, len;

    if (list.length == 0) {
      return null;
    }

    ul = document.createElement('ul');
    ul.className = css.tocList;
    for (i = 0, len = list.length; i < len; i++) {
      section = list[i];

      li = document.createElement('li');
      li.className = css.tocListItem.replace('#', section.level);

      if (createLinks) {