mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-01 03:57:37 +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;
|
var attr = element.attributes;
|
||||||
print(attr);
|
print(attr);
|
||||||
if (attr['class'] == 'todo' && attr['type'] == 'checkbox') {
|
if (attr['class'] == 'todo' && attr['type'] == 'checkbox') {
|
||||||
bool val = attr.containsKey('checked');
|
if (attr.containsKey('checked')) {
|
||||||
if (val) {
|
if (attr.containsKey('uppercase')) {
|
||||||
|
buffer.write('[X]');
|
||||||
|
} else {
|
||||||
buffer.write('[x]');
|
buffer.write('[x]');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
buffer.write('[ ]');
|
buffer.write('[ ]');
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ How are you doing?
|
|||||||
|
|
||||||
- [ ] item 1
|
- [ ] item 1
|
||||||
- [x] item 2
|
- [x] item 2
|
||||||
- [x] item 3
|
- [X] item 3
|
||||||
- [ ] item 4
|
- [ ] item 4
|
||||||
- [ ] item 5
|
- [ ] item 5
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ How are you doing?
|
|||||||
|
|
||||||
- [x] item 1
|
- [x] item 1
|
||||||
- [ ] Foo
|
- [ ] Foo
|
||||||
- [x] item 3
|
- [X] item 3
|
||||||
- [ ] item 4
|
- [ ] item 4
|
||||||
- [ ] Howdy
|
- [ ] Howdy
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user