prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
14 lines (13 loc) • 339 B
JavaScript
import { l as r } from "../index-fa58cb3b.js";
import { i as e } from "../patterns-9129a01c.js";
import "../prismCore-5c7f03d0.js";
const i = /[([{][^\n)\]}]*$|:[ \t]*$/;
r.py = r.python = {
comments: {
line: "#"
},
autoIndent: [
([t], o) => i.test(o.substring(t - 999, t)),
([t, o], n) => e.test(n[t - 1] + n[o])
]
};