this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 46 lines 851 B view raw
1{ 2 function MakeAdd(description, attributes) { 3 return { 4 description: description, 5 attributes: attributes || [] 6 }; 7 } 8 9 function MakeAttributes(attributes) { 10 return attributes.flatMap(attr => attr[1]); 11 } 12} 13 14Add = desc:Description attributes:Attributes? { 15 return MakeAdd(desc, attributes); 16} 17 18Description = chars:(!Attribute .)+ { 19 return chars.map(c => c[1]).join(''); 20} 21 22Attributes = attributes:(_ Attribute)* { 23 return MakeAttributes(attributes); 24} 25 26Attribute = Project / Priority / Tag 27 28Project = ("pro:" / "project:" / "+") value:Word { 29 return { type: "project", value: value }; 30} 31 32Priority = "priority:" value:[HML] { 33 return { type: "priority", value: value }; 34} 35 36Tag = "#" value:Word { 37 return { type: "tag", value: value }; 38} 39 40Word = chars:[a-zA-Z0-9_-]+ { 41 return chars.join(''); 42} 43 44_ = [ \\t]* 45 46EOF = !.