Skip to content

Commit 266ff3f

Browse files
committed
Added support for @TAG: comment markup.
1 parent 265eb9c commit 266ff3f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

app.bundle

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

public/forms/components.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{ if value && value.length }}
1414
<div class="partscurrent">
1515
{{ foreach m in value }}
16-
<div class="part exec" data-exec="components/find" data-search="{{ m.name }}" data-todo="1" data-index="{{ $index }}" title="@(Line:) {{ m.line }}"><i class="ti ti-warning red"></i>{{ m.name }}</div>
16+
<div class="part exec" data-exec="components/find" data-search="{{ m.name }}" data-todo="1" data-index="{{ $index }}" title="@(Line:) {{ m.line }}"><i class="{{ if m.type === 'tag' }}ti ti-bookmark{{ else }}ti ti-warning red{{ fi }}"></i>{{ m.name }}</div>
1717
{{ end }}
1818
</div>
1919
{{ fi }}

public/js/func.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,9 +2399,9 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
23992399

24002400
FUNC.parts_parser = function(val, mode) {
24012401

2402-
var REGTODO = /@todo/i;
2402+
var REGTODO = /@todo|@tag/i;
24032403
var REGTODO2 = /^(\s)+-\s.*?/;
2404-
var REGTODOREPLACE = /^@todo(:)(\s)|(\s)+-(\s)/i;
2404+
var REGTODOREPLACE = /^@todo|@tag(:)(\s)|(\s)+-(\s)/i;
24052405
var REGTODODONE = /@done|@canceled/i;
24062406
var REGTODOCLEAN = /-->|\*\//g;
24072407
var REGPART = /(COMPONENT|COMPONENT_EXTEND|EXTENSION|CONFIG|NEWSCHEMA|NEWCOMMAND|NEWOPERATION|NEWTASK|MIDDLEWARE|WATCH|ROUTE|(^|\s)ON|PLUGIN|PLUGINABLE)+\(.*?\)/g;
@@ -2443,7 +2443,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24432443
m = mode === 'todo' ? line.match(REGTODO2) : line.match(REGTODO);
24442444

24452445
if (m && !REGTODODONE.test(line))
2446-
todos.push({ line: i + 1, ch: m.index || 0, name: line.substring(m.index, 200).replace(REGTODOREPLACE, '').replace(REGTODOCLEAN, '').trim() });
2446+
todos.push({ line: i + 1, ch: m.index || 0, type: m[0].charAt(0) === '@' ? m[0].substring(1).toLowerCase() : '', name: line.substring(m.index, 200).replace(REGTODOREPLACE, '').replace(REGTODOCLEAN, '').trim() });
24472447

24482448
/*
24492449
if (line && mode !== 'css') {

0 commit comments

Comments
 (0)