mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 09:35:38 -05:00
WYSIWYG Improvements to Nested Lists (#14052)
* indent/outdent working properly * Add tests * Latest fixes and tests * PR comments + comments
This commit is contained in:
@@ -148,10 +148,18 @@ suite('HTML Markdown Converter', function (): void {
|
||||
test('Should transform <li> tags', () => {
|
||||
htmlString = '<ul><li>Test</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test`, 'Basic unordered list test failed');
|
||||
htmlString = '<ul><li><span>Test</span><br></li><li>Test2</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test\n- Test2`, 'Basic unordered list test with span and line break failed');
|
||||
htmlString = '<ul><li><span>Test</span><br><br></li><li>Test2</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test \n \n \n- Test2`, 'Basic unordered list test with span and line break failed');
|
||||
htmlString = '<ul><li>Test</li><li>Test2</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test\n- Test2`, 'Basic unordered 2 item list test failed');
|
||||
htmlString = '<ul><li>Test<ul><li>Test2</li></ul><li>Test3</li></ul>';
|
||||
htmlString = '<ul><li>Test</li><ul><li>Test2</li></ul><li>Test3</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test\n - Test2\n- Test3`, 'Nested item list test failed');
|
||||
htmlString = '<ul><li>Test</li><ul><li>Test2</li></ul><ul></ul><li>Test3</li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Test\n - Test2\n- Test3`, 'Nested item list test empty list failed');
|
||||
htmlString = '<ul><li><span>Hello</span><br></li><li><span>Hello</span></li></ul>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `- Hello\n- Hello`, 'Nested item list test empty list failed');
|
||||
htmlString = '<ol><li>Test</li></ol>';
|
||||
assert.equal(htmlMarkdownConverter.convert(htmlString), `1. Test`, 'Basic ordered item test failed');
|
||||
htmlString = '<ol><li>Test</li><li>Test2</li></ol>';
|
||||
|
||||
Reference in New Issue
Block a user