829 }, I.parseInline = function(e2, t2) {
830 if (null == e2)
831 throw new Error("marked.parseInline(): input parameter is undefined or null");
832 if ("string" != typeof e2)833 throw new Error("marked.parseInline(): input parameter is of type " + Object.prototype.toString.call(e2) + ", string expected");
834 m(t2 = C({}, I.defaults, t2 || {}));
835 try {
827 }();
828 return o2;
829 }, I.parseInline = function(e2, t2) {
830 if (null == e2)831 throw new Error("marked.parseInline(): input parameter is undefined or null");
832 if ("string" != typeof e2)
833 throw new Error("marked.parseInline(): input parameter is of type " + Object.prototype.toString.call(e2) + ", string expected");
8 var require_markedjs = __commonJS({
9 "app/javascript/markedjs.js"(exports, module) {
10 !function(e, t) {
11 "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).marked = {}); 12 }(exports, function(r) {
13 "use strict";
14 function i(e2, t2) {
8 var require_markedjs = __commonJS({
9 "app/javascript/markedjs.js"(exports, module) {
10 !function(e, t) {
11 "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).marked = {}); 12 }(exports, function(r) {
13 "use strict";
14 function i(e2, t2) {
8 var require_markedjs = __commonJS({
9 "app/javascript/markedjs.js"(exports, module) {
10 !function(e, t) {
11 "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).marked = {}); 12 }(exports, function(r) {
13 "use strict";
14 function i(e2, t2) {
Yoda conditions are named so because the literal value of the condition comes first while the variable comes second.
For instance,
if ("red" === color) {
// ...
}
Yoda condition is fixed by switching the literal and variable.
This is called a Yoda condition because it reads as, "if red equals the color", similar to the way the Star Wars character Yoda speaks. Compare to the other way of arranging the operands:
if (color === "red") {
// ...
}
This typically reads, "if the color equals red", which is arguably a more natural way to describe the comparison.
if ("red" === color) {
// ...
}
if (true == flag) {
// ...
}
if (5 > count) {
// ...
}
if (-1 < str.indexOf(substr)) {
// ...
}
if (color === "red") {
// ...
}
if (flag === true) {
// ...
}
if (count < 5) {
// ...
}
if (str.indexOf(substr) > -1) {
// ...
}