Skip to content
This repository was archived by the owner on Nov 15, 2019. It is now read-only.

Commit abb049f

Browse files
Properly styling box lines
1 parent 6cd1390 commit abb049f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.todo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
☐ Font: toggle should work like Svelto.Editor's implementation
77
☐ Multi-cursor is broken
88
☐ Redo doesn't work
9-
☐ Style inside colored todos
9+
☐ Style inside todos

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "noty",
33
"productName": "Noty",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"description": "Autosaving sticky note with support for multiple notes, find/replace, programmers shortcuts and more.",
66
"main": "dist/main.js",
77
"scripts": {

src/ui/code/todo.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ const Todo = {
1111
CHECKMARK: '✔',
1212
CANCELMARK: '✘',
1313

14-
projectRe: /^(?![^\S\n]*[^\n@]*)(.+:[^\S\n]*)(?:(?=@)|$)/,
15-
doneRe: /^([^\S\n]*[^\n@]*)/,
16-
cancelRe: /^([^\S\n]*[^\n@]*)/,
14+
boxRe: /^[^\S\n]*((?:[-]|\[ \])[^\n@]*)/,
15+
doneRe: /^[^\S\n]*((?:[+]|\[[x+]\])[^\n@]*)/,
16+
cancelRe: /^[^\S\n]*((?:[x]|\[-\])[^\n@]*)/,
17+
projectRe: /^(?![^\S\n]*(?:[-x+]|\[[ x+-]\])[^\n@]*)[^\S\n]*(.+:[^\S\n]*)(?:(?=@)|$)/,
1718

1819
getTokens () {
1920

2021
return {
2122
start: [
22-
{ regex: Todo.projectRe, token: 'todo-project' },
23+
{ regex: Todo.boxRe, token: 'todo-box' },
2324
{ regex: Todo.doneRe, token: 'todo-done' },
24-
{ regex: Todo.cancelRe, token: 'todo-cancel' }
25+
{ regex: Todo.cancelRe, token: 'todo-cancel' },
26+
{ regex: Todo.projectRe, token: 'todo-project' }
2527
]
2628
};
2729

0 commit comments

Comments
 (0)