export: txt import include correct OL prefix (#4086)

Includes test coverage
Final part of solving https://github.com/ether/etherpad-lite/issues/3447
This commit is contained in:
John McLear 2020-06-06 14:30:13 +01:00 committed by GitHub
parent 423be7f081
commit aff93d24dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 5 deletions

View file

@ -36,8 +36,19 @@ var testImports = {
expectedHTML: '<!DOCTYPE HTML><html><body><ul class="bullet"><li>FOO</ul><br></body></html>',
expectedText: '\t* FOO\n\n'
},
"prefixcorrectlinenumber":{
input: '<html><body><ol><li>should be 1</li><li>should be 2</li></ol></body></html>',
expectedHTML: '<!DOCTYPE HTML><html><body><ol start="1" class="number"><li>should be 1</li><li>should be 2</ol><br></body></html>',
expectedText: '\t1. should be 1\n\t2. should be 2\n\n'
},
"prefixcorrectlinenumbernested":{
input: '<html><body><ol><li>should be 1</li><ol><li>foo</li></ol><li>should be 2</li></ol></body></html>',
expectedHTML: '<!DOCTYPE HTML><html><body><ol start="1" class="number"><li>should be 1<ol start="2" class="number"><li>foo</ol><li>should be 2</ol><br></body></html>',
expectedText: '\t1. should be 1\n\t\t1.1. foo\n\t2. should be 2\n\n'
},
/*
"prefixcorrectlinenumber #3450":{
"prefixcorrectlinenumber when introduced none list item - currently not supported see #3450":{
input: '<html><body><ol><li>should be 1</li>test<li>should be 2</li></ol></body></html>',
expectedHTML: '<!DOCTYPE HTML><html><body><ol start="1" class="number"><li>should be 1</li>test<li>should be 2</li></ol><br></body></html>',
expectedText: '\t1. should be 1\n\ttest\n\t2. should be 2\n\n'