1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/packages/editor/CodeMirror/markdown/utils/stripBlockquote.ts

16 lines
303 B
TypeScript

import { Line } from '@codemirror/state';
const blockQuoteRegex = /^>\s/;
export const stripBlockquote = (line: Line): string => {
const match = line.text.match(blockQuoteRegex);
if (match) {
return line.text.substring(match[0].length);
}
return line.text;
};
export default stripBlockquote;