mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
Fix automath tests
This commit is contained in:
@@ -5,7 +5,7 @@ import LiveRange from '@ckeditor/ckeditor5-engine/src/model/liverange';
|
||||
import LivePosition from '@ckeditor/ckeditor5-engine/src/model/liveposition';
|
||||
import global from '@ckeditor/ckeditor5-utils/src/dom/global';
|
||||
|
||||
import { defaultConfig, extractDelimiters, hasDelimiters } from './utils';
|
||||
import { defaultConfig, extractDelimiters, hasDelimiters, delimitersCounts } from './utils';
|
||||
|
||||
export default class AutoMath extends Plugin {
|
||||
static get requires() {
|
||||
@@ -76,7 +76,7 @@ export default class AutoMath extends Plugin {
|
||||
text = text.trim();
|
||||
|
||||
// Skip if don't have delimiters
|
||||
if ( !hasDelimiters( text ) ) {
|
||||
if ( !hasDelimiters( text ) || delimitersCounts( text ) !== 2 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user