markdown-it-include
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,2 +0,2 @@ | ||
/*! markdown-it-include 1.1.0 https://github.com//camelaissani//markdown-it-include @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitInclude = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
/*! markdown-it-include 1.1.1 https://github.com//camelaissani//markdown-it-include @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitInclude = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
@@ -505,3 +505,6 @@ },{}],2:[function(require,module,exports){ | ||
var root = '.', | ||
includeRe = INCLUDE_RE; | ||
includeRe = INCLUDE_RE, | ||
throwError = true, | ||
notFoundMessage = 'File \'{{FILE}}\' not found', | ||
circularMessage = 'Circular reference between \'{{FILE}}\' and \'{{PARENT}}\''; | ||
@@ -514,2 +517,5 @@ if (options) { | ||
includeRe = options.includeRe || includeRe; | ||
throwError = options.throwError || throwError; | ||
notFoundMessage = options.notFoundMessage || notFoundMessage; | ||
circularMessage = options.circularMessage || circularMessage; | ||
} | ||
@@ -520,3 +526,3 @@ } | ||
filesProcessed = filesProcessed ? filesProcessed.slice() : []; // making a copy | ||
var cap, filePath, mdSrc, indexOfCircularRef; | ||
var cap, filePath, mdSrc, errorMessage; | ||
@@ -530,11 +536,25 @@ // store parent file path to check circular references | ||
// check if circular reference | ||
indexOfCircularRef = filesProcessed.indexOf(filePath); | ||
if (indexOfCircularRef !== -1) { | ||
throw new Error('Circular reference between ' + filePath + ' and ' + filesProcessed[indexOfCircularRef]); | ||
// check if child file exists or if there is a circular reference | ||
if (!fs.existsSync(filePath)) { | ||
// child file does not exist | ||
errorMessage = notFoundMessage.replace('{{FILE}}', filePath); | ||
} else if (filesProcessed.indexOf(filePath) !== -1) { | ||
// reference would be circular | ||
errorMessage = circularMessage.replace('{{FILE}}', filePath).replace('{{PARENT}}', parentFilePath); | ||
} | ||
// check if there were any errors | ||
if (errorMessage) { | ||
if (throwError) { | ||
throw new Error(errorMessage); | ||
} | ||
mdSrc = errorMessage; | ||
} else { | ||
// get content of child file | ||
mdSrc = fs.readFileSync(filePath, 'utf8'); | ||
// check if child file also has includes | ||
mdSrc = _replaceIncludeByContent(mdSrc, path.dirname(filePath), filePath, filesProcessed); | ||
} | ||
// replace include by file content | ||
mdSrc = fs.readFileSync(filePath, 'utf8'); | ||
mdSrc = _replaceIncludeByContent(mdSrc, path.dirname(filePath), filePath, filesProcessed); | ||
src = src.slice(0, cap.index) + mdSrc + src.slice(cap.index + cap[0].length, src.length); | ||
@@ -541,0 +561,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitInclude=e()}}(function(){return function o(u,f,s){function c(r,e){if(!f[r]){if(!u[r]){var n="function"==typeof require&&require;if(!e&&n)return n(r,!0);if(l)return l(r,!0);var t=new Error("Cannot find module '"+r+"'");throw t.code="MODULE_NOT_FOUND",t}var i=f[r]={exports:{}};u[r][0].call(i.exports,function(e){return c(u[r][1][e]||e)},i,i.exports,o,u,f,s)}return f[r].exports}for(var l="function"==typeof require&&require,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,r,n){},{}],2:[function(e,r,c){(function(i){function o(e,r){for(var n=0,t=e.length-1;0<=t;t--){var i=e[t];"."===i?e.splice(t,1):".."===i?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(r)for(;n--;n)e.unshift("..");return e}function u(e,r){if(e.filter)return e.filter(r);for(var n=[],t=0;t<e.length;t++)r(e[t],t,e)&&n.push(e[t]);return n}c.resolve=function(){for(var e="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var t=0<=n?arguments[n]:i.cwd();if("string"!=typeof t)throw new TypeError("Arguments to path.resolve must be strings");t&&(e=t+"/"+e,r="/"===t.charAt(0))}return(r?"/":"")+(e=o(u(e.split("/"),function(e){return!!e}),!r).join("/"))||"."},c.normalize=function(e){var r=c.isAbsolute(e),n="/"===t(e,-1);return(e=o(u(e.split("/"),function(e){return!!e}),!r).join("/"))||r||(e="."),e&&n&&(e+="/"),(r?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(u(e,function(e,r){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,r){function n(e){for(var r=0;r<e.length&&""===e[r];r++);for(var n=e.length-1;0<=n&&""===e[n];n--);return n<r?[]:e.slice(r,n-r+1)}e=c.resolve(e).substr(1),r=c.resolve(r).substr(1);for(var t=n(e.split("/")),i=n(r.split("/")),o=Math.min(t.length,i.length),u=o,f=0;f<o;f++)if(t[f]!==i[f]){u=f;break}var s=[];for(f=u;f<t.length;f++)s.push("..");return(s=s.concat(i.slice(u))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,t=-1,i=!0,o=e.length-1;1<=o;--o)if(47===(r=e.charCodeAt(o))){if(!i){t=o;break}}else i=!1;return-1===t?n?"/":".":n&&1===t?"/":e.slice(0,t)},c.basename=function(e,r){var n=function(e){"string"!=typeof e&&(e+="");var r,n=0,t=-1,i=!0;for(r=e.length-1;0<=r;--r)if(47===e.charCodeAt(r)){if(!i){n=r+1;break}}else-1===t&&(i=!1,t=r+1);return-1===t?"":e.slice(n,t)}(e);return r&&n.substr(-1*r.length)===r&&(n=n.substr(0,n.length-r.length)),n},c.extname=function(e){"string"!=typeof e&&(e+="");for(var r=-1,n=0,t=-1,i=!0,o=0,u=e.length-1;0<=u;--u){var f=e.charCodeAt(u);if(47===f){if(i)continue;n=u+1;break}-1===t&&(i=!1,t=u+1),46===f?-1===r?r=u:1!==o&&(o=1):-1!==r&&(o=-1)}return-1===r||-1===t||0===o||1===o&&r===t-1&&r===n+1?"":e.slice(r,t)};var t="b"==="ab".substr(-1)?function(e,r,n){return e.substr(r,n)}:function(e,r,n){return r<0&&(r=e.length+r),e.substr(r,n)}}).call(this,e("_process"))},{_process:3}],3:[function(e,r,n){var t,i,o=r.exports={};function u(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function s(r){if(t===setTimeout)return setTimeout(r,0);if((t===u||!t)&&setTimeout)return t=setTimeout,setTimeout(r,0);try{return t(r,0)}catch(e){try{return t.call(null,r,0)}catch(e){return t.call(this,r,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:u}catch(e){t=u}try{i="function"==typeof clearTimeout?clearTimeout:f}catch(e){i=f}}();var c,l=[],a=!1,h=-1;function p(){a&&c&&(a=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!a){var e=s(p);a=!0;for(var r=l.length;r;){for(c=l,l=[];++h<r;)c&&c[h].run();h=-1,r=l.length}c=null,a=!1,function(r){if(i===clearTimeout)return clearTimeout(r);if((i===f||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(r);try{i(r)}catch(e){try{return i.call(null,r)}catch(e){return i.call(this,r)}}}(e)}}function g(e,r){this.fun=e,this.array=r}function v(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];l.push(new g(e,r)),1!==l.length||a||s(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],4:[function(e,r,n){"use strict";var l=e("path"),a=e("fs"),t=/\!{3}\s*include\s*\(\s*(.+?)\s*\)\s*\!{3}/i;r.exports=function(e,r){var n=".",c=t;r&&("string"==typeof r?n=r:(n=r.root||n,c=r.includeRe||c)),e.core.ruler.before("normalize","include",function(e){e.src=function e(r,n,t,i){var o,u,f,s;for(i=i?i.slice():[],t&&i.push(t);o=c.exec(r);){if(u=l.resolve(n,o[1].trim()),-1!==(s=i.indexOf(u)))throw new Error("Circular reference between "+u+" and "+i[s]);f=e(f=a.readFileSync(u,"utf8"),l.dirname(u),u,i),r=r.slice(0,o.index)+f+r.slice(o.index+o[0].length,r.length)}return r}(e.src,n)})}},{fs:1,path:2}]},{},[4])(4)}); | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitInclude=e()}(function(){return function o(u,s,f){function c(r,e){if(!s[r]){if(!u[r]){var n="function"==typeof require&&require;if(!e&&n)return n(r,!0);if(l)return l(r,!0);var t=new Error("Cannot find module '"+r+"'");throw t.code="MODULE_NOT_FOUND",t}var i=s[r]={exports:{}};u[r][0].call(i.exports,function(e){return c(u[r][1][e]||e)},i,i.exports,o,u,s,f)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e<f.length;e++)c(f[e]);return c}({1:[function(e,r,n){},{}],2:[function(e,r,c){(function(i){function o(e,r){for(var n=0,t=e.length-1;0<=t;t--){var i=e[t];"."===i?e.splice(t,1):".."===i?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(r)for(;n--;)e.unshift("..");return e}function u(e,r){if(e.filter)return e.filter(r);for(var n=[],t=0;t<e.length;t++)r(e[t],t,e)&&n.push(e[t]);return n}c.resolve=function(){for(var e="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var t=0<=n?arguments[n]:i.cwd();if("string"!=typeof t)throw new TypeError("Arguments to path.resolve must be strings");t&&(e=t+"/"+e,r="/"===t.charAt(0))}return(r?"/":"")+(e=o(u(e.split("/"),function(e){return!!e}),!r).join("/"))||"."},c.normalize=function(e){var r=c.isAbsolute(e),n="/"===t(e,-1);return(e=o(u(e.split("/"),function(e){return!!e}),!r).join("/"))||r||(e="."),e&&n&&(e+="/"),(r?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(u(e,function(e,r){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,r){function n(e){for(var r=0;r<e.length&&""===e[r];r++);for(var n=e.length-1;0<=n&&""===e[n];n--);return n<r?[]:e.slice(r,n-r+1)}e=c.resolve(e).substr(1),r=c.resolve(r).substr(1);for(var t=n(e.split("/")),i=n(r.split("/")),o=Math.min(t.length,i.length),u=o,s=0;s<o;s++)if(t[s]!==i[s]){u=s;break}for(var f=[],s=u;s<t.length;s++)f.push("..");return(f=f.concat(i.slice(u))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,t=-1,i=!0,o=e.length-1;1<=o;--o)if(47===(r=e.charCodeAt(o))){if(!i){t=o;break}}else i=!1;return-1===t?n?"/":".":n&&1===t?"/":e.slice(0,t)},c.basename=function(e,r){var n=function(e){"string"!=typeof e&&(e+="");for(var r=0,n=-1,t=!0,i=e.length-1;0<=i;--i)if(47===e.charCodeAt(i)){if(!t){r=i+1;break}}else-1===n&&(t=!1,n=i+1);return-1===n?"":e.slice(r,n)}(e);return r&&n.substr(-1*r.length)===r&&(n=n.substr(0,n.length-r.length)),n},c.extname=function(e){"string"!=typeof e&&(e+="");for(var r=-1,n=0,t=-1,i=!0,o=0,u=e.length-1;0<=u;--u){var s=e.charCodeAt(u);if(47===s){if(i)continue;n=u+1;break}-1===t&&(i=!1,t=u+1),46===s?-1===r?r=u:1!==o&&(o=1):-1!==r&&(o=-1)}return-1===r||-1===t||0===o||1===o&&r===t-1&&r===n+1?"":e.slice(r,t)};var t="b"==="ab".substr(-1)?function(e,r,n){return e.substr(r,n)}:function(e,r,n){return r<0&&(r=e.length+r),e.substr(r,n)}}).call(this,e("_process"))},{_process:3}],3:[function(e,r,n){var t,i,o=r.exports={};function u(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function f(r){if(t===setTimeout)return setTimeout(r,0);if((t===u||!t)&&setTimeout)return t=setTimeout,setTimeout(r,0);try{return t(r,0)}catch(e){try{return t.call(null,r,0)}catch(e){return t.call(this,r,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:u}catch(e){t=u}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],a=!1,h=-1;function p(){a&&c&&(a=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!a){var e=f(p);a=!0;for(var r=l.length;r;){for(c=l,l=[];++h<r;)c&&c[h].run();h=-1,r=l.length}c=null,a=!1,function(r){if(i===clearTimeout)return clearTimeout(r);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(r);try{i(r)}catch(e){try{return i.call(null,r)}catch(e){return i.call(this,r)}}}(e)}}function g(e,r){this.fun=e,this.array=r}function v(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];l.push(new g(e,r)),1!==l.length||a||f(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],4:[function(e,r,n){"use strict";var p=e("path"),d=e("fs"),t=/\!{3}\s*include\s*\(\s*(.+?)\s*\)\s*\!{3}/i;r.exports=function(e,r){var n=".",c=t,l=!0,a="File '{{FILE}}' not found",h="Circular reference between '{{FILE}}' and '{{PARENT}}'";r&&("string"==typeof r?n=r:(n=r.root||n,c=r.includeRe||c,l=r.throwError||l,a=r.notFoundMessage||a,h=r.circularMessage||h)),e.core.ruler.before("normalize","include",function(e){e.src=function e(r,n,t,i){var o,u,s,f;for(i=i?i.slice():[],t&&i.push(t);o=c.exec(r);){if(u=p.resolve(n,o[1].trim()),d.existsSync(u)?-1!==i.indexOf(u)&&(f=h.replace("{{FILE}}",u).replace("{{PARENT}}",t)):f=a.replace("{{FILE}}",u),f){if(l)throw new Error(f);s=f}else s=e(s=d.readFileSync(u,"utf8"),p.dirname(u),u,i);r=r.slice(0,o.index)+s+r.slice(o.index+o[0].length,r.length)}return r}(e.src,n)})}},{fs:1,path:2}]},{},[4])(4)}); |
36
index.js
@@ -10,3 +10,6 @@ 'use strict'; | ||
var root = '.', | ||
includeRe = INCLUDE_RE; | ||
includeRe = INCLUDE_RE, | ||
throwError = true, | ||
notFoundMessage = 'File \'{{FILE}}\' not found', | ||
circularMessage = 'Circular reference between \'{{FILE}}\' and \'{{PARENT}}\''; | ||
@@ -19,2 +22,5 @@ if (options) { | ||
includeRe = options.includeRe || includeRe; | ||
throwError = options.throwError || throwError; | ||
notFoundMessage = options.notFoundMessage || notFoundMessage; | ||
circularMessage = options.circularMessage || circularMessage; | ||
} | ||
@@ -25,3 +31,3 @@ } | ||
filesProcessed = filesProcessed ? filesProcessed.slice() : []; // making a copy | ||
var cap, filePath, mdSrc, indexOfCircularRef; | ||
var cap, filePath, mdSrc, errorMessage; | ||
@@ -35,11 +41,25 @@ // store parent file path to check circular references | ||
// check if circular reference | ||
indexOfCircularRef = filesProcessed.indexOf(filePath); | ||
if (indexOfCircularRef !== -1) { | ||
throw new Error('Circular reference between ' + filePath + ' and ' + filesProcessed[indexOfCircularRef]); | ||
// check if child file exists or if there is a circular reference | ||
if (!fs.existsSync(filePath)) { | ||
// child file does not exist | ||
errorMessage = notFoundMessage.replace('{{FILE}}', filePath); | ||
} else if (filesProcessed.indexOf(filePath) !== -1) { | ||
// reference would be circular | ||
errorMessage = circularMessage.replace('{{FILE}}', filePath).replace('{{PARENT}}', parentFilePath); | ||
} | ||
// check if there were any errors | ||
if (errorMessage) { | ||
if (throwError) { | ||
throw new Error(errorMessage); | ||
} | ||
mdSrc = errorMessage; | ||
} else { | ||
// get content of child file | ||
mdSrc = fs.readFileSync(filePath, 'utf8'); | ||
// check if child file also has includes | ||
mdSrc = _replaceIncludeByContent(mdSrc, path.dirname(filePath), filePath, filesProcessed); | ||
} | ||
// replace include by file content | ||
mdSrc = fs.readFileSync(filePath, 'utf8'); | ||
mdSrc = _replaceIncludeByContent(mdSrc, path.dirname(filePath), filePath, filesProcessed); | ||
src = src.slice(0, cap.index) + mdSrc + src.slice(cap.index + cap[0].length, src.length); | ||
@@ -46,0 +66,0 @@ } |
{ | ||
"name": "markdown-it-include", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Markdown-it plugin which adds the ability to include markdown fragment files.", | ||
@@ -28,14 +28,17 @@ "keywords": [ | ||
}, | ||
"peerDependencies": { | ||
"markdown-it": ">=8.4.2 <11.0.0" | ||
}, | ||
"devDependencies": { | ||
"browserify": "16.2.3", | ||
"chai": "^4.2.0", | ||
"coveralls": "3.0.2", | ||
"eslint": "5.14.0", | ||
"browserify": "16.5.1", | ||
"chai": "4.2.0", | ||
"coveralls": "3.1.0", | ||
"eslint": "7.0.0", | ||
"eslint-plugin-nodeca": "1.0.3", | ||
"istanbul": "0.4.5", | ||
"markdown-it": "8.4.2", | ||
"markdown-it-testgen": "0.1.4", | ||
"mocha": "5.2.0", | ||
"uglify-js": "3.4.9" | ||
"markdown-it": "10.0.0", | ||
"markdown-it-testgen": "0.1.6", | ||
"mocha": "7.1.2", | ||
"nyc": "15.0.1", | ||
"uglify-js": "3.9.3" | ||
} | ||
} |
@@ -22,16 +22,12 @@ # markdown-it-include | ||
**header.md** | ||
### File: '**header.md**' | ||
```markdown | ||
# This is my header for all my markdowns | ||
``` | ||
**footer.md** | ||
### File: '**footer.md**' | ||
```markdown | ||
Follow me on twitter! | ||
``` | ||
@@ -41,3 +37,2 @@ | ||
Now it's your turn to play markdown-it! | ||
@@ -72,2 +67,3 @@ | ||
### root | ||
* Type: `String` | ||
@@ -79,2 +75,3 @@ * Default: `.` | ||
### includeRe | ||
* Type: `RegExp` | ||
@@ -85,2 +82,23 @@ * Default: `/\!{3}\s*include\s*\(\s*(.+?)\s*\)\s*\!{3}/i` | ||
### throwError | ||
* Type: `Boolean` | ||
* Default: `true` | ||
When set to `false`, instead of throwing an error message, the error message will be written into the output. For references to possible error messages as well as how to change it, see options 'notFoundMessage' and 'circularMessage' | ||
### notFoundMessage | ||
* Type: `String` | ||
* Default: `File '{{FILE}}' not found` | ||
With `notFoundMessage` the default error message when the to be included file cannot be found can be changed. The marker `{{FILE}}` in the message string will be replaced with the full file path. | ||
### circularMessage | ||
* Type: `String` | ||
* Default: `Circular reference between '{{FILE}}' and '{{PARENT}}'` | ||
With `circularMessage` the default error message when there is a circular reference between files can be changed. The markers `{{FILE}}` and `{{FILE}}` in the message string will be replaced with the respective full file paths. | ||
## Disclaimer | ||
@@ -87,0 +105,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31667
608
106
1