Files
klz-cables.com/.pnpm-store/v10/files/7e/340e4a9e1f53a6c118c8f1016c21a414e54af8ff1f0c0ed7a49cd613db1f33744296cad2a8f0d0a72905f130f725858ddf98cef4c27419447f9ded6d52b38f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

42 lines
1.2 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getQuote = exports.quotes = void 0;
var parser_1 = require("../syntax/parser");
exports.quotes = {
name: 'quotes',
initialValue: 'none',
prefix: true,
type: 1 /* LIST */,
parse: function (_context, tokens) {
if (tokens.length === 0) {
return null;
}
var first = tokens[0];
if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {
return null;
}
var quotes = [];
var filtered = tokens.filter(parser_1.isStringToken);
if (filtered.length % 2 !== 0) {
return null;
}
for (var i = 0; i < filtered.length; i += 2) {
var open_1 = filtered[i].value;
var close_1 = filtered[i + 1].value;
quotes.push({ open: open_1, close: close_1 });
}
return quotes;
}
};
var getQuote = function (quotes, depth, open) {
if (!quotes) {
return '';
}
var quote = quotes[Math.min(depth, quotes.length - 1)];
if (!quote) {
return '';
}
return open ? quote.open : quote.close;
};
exports.getQuote = getQuote;
//# sourceMappingURL=quotes.js.map