mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-27 18:58:12 +00:00
final fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { HighlightStyle } from '@codemirror/language';
|
||||
import { tags } from '@lezer/highlight';
|
||||
|
||||
// Making the tokens
|
||||
const customTags = {
|
||||
pageLine : 'pageLine', // .cm-pageLine
|
||||
snippetLine : 'snippetLine', // .cm-snippetLine
|
||||
@@ -11,10 +10,6 @@ export function legacyTokenizeCustomMarkdown(text) {
|
||||
const tokens = [];
|
||||
const lines = text.split('\n');
|
||||
|
||||
// Track multi-line blocks
|
||||
const inBlock = false;
|
||||
const blockStart = 0;
|
||||
|
||||
lines.forEach((lineText, lineNumber)=>{
|
||||
// --- Page / snippet lines ---
|
||||
if(/^(?=\\page(?:break)?(?: *{[^\n{}]*})?$)/m.test(lineText)) tokens.push({ line: lineNumber, type: customTags.pageLine });
|
||||
@@ -31,4 +26,3 @@ export const legacyCustomHighlightStyle = HighlightStyle.define([
|
||||
{ tag: customTags.snippetLine, class: 'cm-snippetLine', color: '#0af' },
|
||||
]);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user