mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 11:33:34 +08:00
Checklist: Add support for upper case 'X'
Requires an extra commit in markd
This commit is contained in:
@ -327,9 +327,12 @@ class MarkdownRenderer implements md.NodeVisitor {
|
||||
var attr = element.attributes;
|
||||
print(attr);
|
||||
if (attr['class'] == 'todo' && attr['type'] == 'checkbox') {
|
||||
bool val = attr.containsKey('checked');
|
||||
if (val) {
|
||||
buffer.write('[x]');
|
||||
if (attr.containsKey('checked')) {
|
||||
if (attr.containsKey('uppercase')) {
|
||||
buffer.write('[X]');
|
||||
} else {
|
||||
buffer.write('[x]');
|
||||
}
|
||||
} else {
|
||||
buffer.write('[ ]');
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ How are you doing?
|
||||
|
||||
- [ ] item 1
|
||||
- [x] item 2
|
||||
- [x] item 3
|
||||
- [X] item 3
|
||||
- [ ] item 4
|
||||
- [ ] item 5
|
||||
|
||||
@ -282,7 +282,7 @@ How are you doing?
|
||||
|
||||
- [x] item 1
|
||||
- [ ] Foo
|
||||
- [x] item 3
|
||||
- [X] item 3
|
||||
- [ ] item 4
|
||||
- [ ] Howdy
|
||||
|
||||
|
Reference in New Issue
Block a user