dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
708 B
22 lines
708 B
import 'package:flutter_quill/quill_delta.dart'; |
|
import 'package:flutter_quill/src/models/documents/delta_x.dart'; |
|
import 'package:test/test.dart'; |
|
|
|
void main() { |
|
const htmlWithEmp = |
|
'<p>This is a normal sentence, and this section has greater emp<em>hasis.</em></p>'; |
|
final expectedDeltaEmp = Delta.fromOperations([ |
|
Operation.insert( |
|
'This is a normal sentence, and this section has greater emp'), |
|
Operation.insert('hasis.', {'italic': true}), |
|
Operation.insert('\n'), |
|
]); |
|
|
|
test('should detect emphasis and parse correctly', () { |
|
final delta = DeltaX.fromHtml( |
|
htmlWithEmp, |
|
configs: const Html2MdConfigs(), |
|
); |
|
expect(delta, expectedDeltaEmp); |
|
}); |
|
}
|
|
|