import { Decoration, EditorState, syntaxTree } from "../deps.ts"; import { decoratorStateField, isCursorInRange } from "./util.ts"; function getDirectives(state: EditorState) { const widgets: any[] = []; syntaxTree(state).iterate({ enter: ({ type, from, to }) => { if (type.name !== "CommentBlock") { return; } const text = state.sliceDoc(from, to); if (/