Source

wikdNode / scripts / splitBeforeChars.groovy

The branch 'default' does not exist.
// @CacheScriptContent(true)
// @ExecutionModes({ON_SINGLE_NODE})

import java.util.regex.Pattern

import org.hardknots.wikd.wikdnode.WikdNode

def mark = ui.showInputDialog(
	node.delegate, 'Enter characters to split node text before...', ''
)

if (mark) {
	WikdNode.splitPlain('(?=' + Pattern.quote(mark ? mark : '') + ')')
}