@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
12 lines (11 loc) • 384 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.expandShorthandHex = void 0;
var SHORTHAND_HEX_REGEX = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i;
var expandShorthandHex = exports.expandShorthandHex = function expandShorthandHex(input) {
return input.replace(SHORTHAND_HEX_REGEX, function (_m, r, g, b) {
return r + r + g + g + b + b;
});
};