UNPKG

carta-plugin-ins-del

Version:
42 lines (41 loc) 1.13 kB
import remarkIns from 'remark-ins'; export const insdel = () => { return { transformers: [ { execution: 'sync', type: 'remark', transform: ({ processor }) => { processor.use(remarkIns); }, }, ], grammarRules: [ { name: 'ins', type: 'inline', definition: { match: '\\+{2}[^+]+?\\+{2}', name: 'markup.ins.markdown', }, }, // Carta already have highlight for del, so we don't need to add it here ], highlightingRules: [ { light: { scope: 'markup.ins', settings: { foreground: '#1fa81f', }, }, dark: { scope: 'markup.ins', settings: { foreground: '#1fa81f', }, }, }, ], }; };