1234567891011121314151617 |
- import { TextBlot } from 'parchment';
- class Text extends TextBlot {}
- function escapeText(text) {
- return text.replace(/[&<>"']/g, s => {
- // https://lodash.com/docs#escape
- const entityMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": '''
- };
- return entityMap[s];
- });
- }
- export { Text as default, escapeText };
- //# sourceMappingURL=text.js.map
|