|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
573 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | module.exports = function generate_comment(it, $keyword, $ruleType) {
|
|---|
| 3 | var out = ' ';
|
|---|
| 4 | var $schema = it.schema[$keyword];
|
|---|
| 5 | var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
|
|---|
| 6 | var $breakOnError = !it.opts.allErrors;
|
|---|
| 7 | var $comment = it.util.toQuotedString($schema);
|
|---|
| 8 | if (it.opts.$comment === true) {
|
|---|
| 9 | out += ' console.log(' + ($comment) + ');';
|
|---|
| 10 | } else if (typeof it.opts.$comment == 'function') {
|
|---|
| 11 | out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
|
|---|
| 12 | }
|
|---|
| 13 | return out;
|
|---|
| 14 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.