Skip to content

Commit 6ae2823

Browse files
committed
Updated autocomplete list + fixed parsing @TODO.
1 parent a40c863 commit 6ae2823

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

app.bundle

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

public/js/editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ SNIPPETS.push({ type: 'js', search: 'SUBSCRIBE', text: '<b>SUBSCRIBE</b>', code:
18371837
SNIPPETS.push({ type: 'js', search: 'CALL', text: '<b>CALL</b>', code: 'CALL(\' --> exec\').params({}).query({}).promise($);', ch: 7, priority: 1 });
18381838
SNIPPETS.push({ type: 'js', search: 'API', text: '<b>API</b>', code: 'API(\'\', \'schema\', {}).controller($).promise($);', ch: 6, priority: 1 });
18391839
SNIPPETS.push({ type: 'js', search: 'NEWACTION', text: '<b>NEWACTION</b>', code: 'NEWACTION(\'\', {\n\t{0}name: \'\',\n\t{0}input: \'\',\n\t{0}route: \'+API ?\',\n\t{0}query: \'\',\n\t{0}params: \'\',\n\t{0}permissions: \'admin\',\n\t{0}// output: \'success:Boolean\',\n\t{0}action: async function($, model) {\n\t{0}\n\t{0}}\n});', ch: 12 });
1840-
SNIPPETS.push({ type: 'js', search: 'NEWSCHEMA', text: '<b>NEWSCHEMA</b> (v5)', code: 'NEWSCHEMA(\'{1}\', \'\');', ch: 12 });
1840+
SNIPPETS.push({ type: 'js', search: 'NEWSCHEMA', text: '<b>NEWSCHEMA</b> (v5)', code: 'NEWSCHEMA(\'@{1}\', \'id,*email:Email\');', ch: 13 });
18411841
SNIPPETS.push({ type: 'js', search: 'NEWSCHEMA', text: '<b>NEWSCHEMA</b> (v4)', code: 'NEWSCHEMA(\'{1}\', function(schema) {\n\t{0}schema.define(\'key\', String, true);\n{0}});', ch: 12 });
18421842
SNIPPETS.push({ type: 'js', search: 'NEWAPI', text: '<b>NEWAPI</b>', code: 'NEWAPI(\'\', function(opt, next) {\n\t{0}RESTBuilder.API(\'https://yourtotalapp.com/api/\', opt.schema, opt.data).strict().callback(next);\n{0}});', ch: 9 });
18431843
SNIPPETS.push({ type: 'js', search: 'NEWJSONSCHEMA', text: '<b>NEWJSONSCHEMA</b>', code: 'NEWJSONSCHEMA(\'\', {});', ch: 16 });
@@ -1853,6 +1853,7 @@ SNIPPETS.push({ type: 'js', search: 'MIDDLEWARE', text: '<b>MIDDLEWARE (UI)</b>'
18531853
SNIPPETS.push({ type: 'js', search: 'USE', text: '<b>USE</b>', code: 'USE(\'\', \'*\', \'dynamic\');', ch: 6 });
18541854
SNIPPETS.push({ type: 'js', search: 'for var', text: '<b>for in</b>', code: 'for (var i = 0; i < .length; i++)', ch: 21, priority: 10 });
18551855
SNIPPETS.push({ type: 'js', search: '$.invalid', text: '<b>$.invalid()</b>', code: 'if (err) {\n\t{0}$.invalid(err);\n\t{0}return;\n{0}}', ch: 30 });
1856+
SNIPPETS.push({ type: 'js', search: '$.successful', text: '<b>$.successful(...)</b>', code: '$.successful(function(response) {\n\t{0}\n{0}});', ch: 35 });
18561857
SNIPPETS.push({ type: 'js', search: 'callback', text: '<b>callback</b>', code: 'callback', ch: 9, priority: 1 });
18571858
SNIPPETS.push({ type: 'js', search: 'callback function', text: '<b>function() {</b>', code: 'function() {\n\t{0}\n{0}}', ch: 30, priority: 1, special: 1 });
18581859
SNIPPETS.push({ type: 'js', search: 'callback function', text: '<b>function(err, response) {</b>', code: 'function(err, response) {\n\t{0}\n{0}}', ch: 30, priority: 1, special: 1 });

public/js/func.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24012401

24022402
var REGTODO = /@todo|@tag/i;
24032403
var REGTODO2 = /^(\s)+-\s.*?/;
2404-
var REGTODOREPLACE = /^@todo|@tag(:)(\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;

0 commit comments

Comments
 (0)