How to use the upad-parse/dist.Translators.Xml function in upad-parse

To help you get started, we’ve selected a few upad-parse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MicroPad / Web / app / src / react-web / components / note-viewer / elements / markdown / MarkdownHelpComponent.tsx View on Github external
private getHtml: () => Promise = async () => {
		const mdGuideNote = (await Translators.Xml.toNotepadFromNpx(helpNpx)).sections[1].notes[0];

		extension('mock', () => {
			let matches: string[] = [];
			return [
				{
					type: 'lang',
					regex: /(===([^]+?)===|''([^]+?)''|;;([^]+?);;)/gi,
					replace: function(s: string, match: string) {
						matches.push('&lt;Maths won\'t display in this view. See the help notepad.&gt;<br>' + match);
						let n = matches.length - 1;
						return '%ph' + n + 'ph%';
					}
				},
				{
					type: 'output',
					filter: function(text: string) {