_jumpTo()

in website/src/components/markdown-page.js [176:193]


  _jumpTo({search}) {
    let section = search.match(/section=([^\?&]+)/);
    section = section && section[1];
    let scrollTop = 0;

    if (section === this._currentSection) {
      return;
    }
    if (section) {
      const anchor = this.refs.container.querySelector(`#${section.toLowerCase()}`);
      scrollTop = this._getScrollPosition(anchor);
    }

    if (this.refs.container.scrollTop !== scrollTop) {
      this._internalScroll = true;
      this.refs.container.scrollTop = scrollTop;
    }
  }