laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
11 lines (10 loc) • 357 B
JavaScript
"use client";
function n(e, t) {
return !!(t.options.fences === !1 && e.value && // If there’s no info…
!e.lang && // And there’s a non-whitespace character…
/[^ \r\n]/.test(e.value) && // And the value doesn’t start or end in a blank…
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value));
}
export {
n as formatCodeAsIndented
};