mirror of
https://github.com/laurent22/joplin.git
synced 2026-06-06 20:10:22 +00:00
16 lines
307 B
TypeScript
16 lines
307 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;
|