<commit_before>import Scrollbar from 'smooth-scrollbar';
import * as Prism from 'prismjs';
import 'prismjs/themes/prism.css';

import './monitor';
import './controller';
import '../styles/index.styl';

declare var __SCROLLBAR_VERSION__: string;

// for debug
(window as any).Scrollbar = Scrollbar;

Prism.highlightAll(false);

(document.getElementById('version') as HTMLElement).textContent = __SCROLLBAR_VERSION__;

if (window.innerWidth < 800) {
  Array.from(document.querySelectorAll('pre, table')).forEach((el: HTMLElement) => {
    const wrap = document.createElement('div');
    wrap.className = 'wrap';
    wrap.appendChild(el);

    if (el.parentNode) {
      el.parentNode.insertBefore(wrap, el);
    }

    Scrollbar.init(wrap, {
      plugins: {
        overscroll: false,
      },
    });
  });
}<commit_msg>fix(demo): wrap code blocks in divs<commit_after>import Scrollbar from 'smooth-scrollbar';
import * as Prism from 'prismjs';
import 'prismjs/themes/prism.css';

import './monitor';
import './controller';
import '../styles/index.styl';

declare var __SCROLLBAR_VERSION__: string;

// for debug
(window as any).Scrollbar = Scrollbar;

Prism.highlightAll(false);

(document.getElementById('version') as HTMLElement).textContent = __SCROLLBAR_VERSION__;

if (window.innerWidth < 800) {
  Array.from(document.querySelectorAll('pre, table')).forEach((el: HTMLElement) => {
    const wrap = document.createElement('div');

    if (el.parentNode) {
      el.parentNode.insertBefore(wrap, el);
    }

    wrap.className = 'wrap';
    wrap.appendChild(el);

    Scrollbar.init(wrap, {
      plugins: {
        overscroll: false,
      },
    });
  });
}
{'fraction_non_alphanumeric': 0.15093205051112446, 'fraction_numerical': 0.0036079374624173183, 'mean_word_length': 3.9376854599406528, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4407233', 'n_tokens_mistral': 553, 'n_tokens_neox': 532, 'n_words': 109}