mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-18 13:11:11 +08:00
13 lines
482 B
JavaScript
13 lines
482 B
JavaScript
import { markdownToTxt } from '../../src/plugins/search/markdown-to-txt.js';
|
|
|
|
describe('search markdown to text', () => {
|
|
test.each([
|
|
['**a *formatted* word**', 'a formatted word'],
|
|
['**a `code` word**', 'a code word'],
|
|
['**[link](https://example.org)**', 'link https://example.org'],
|
|
['**plain bold text**', 'plain bold text'],
|
|
])('extracts nested inline content from %s', (markdown, expected) => {
|
|
expect(markdownToTxt(markdown)).toBe(expected);
|
|
});
|
|
});
|