diff --git a/src/Meta.ts b/src/Meta.ts index 61be6dc4..6728eb3f 100644 --- a/src/Meta.ts +++ b/src/Meta.ts @@ -17,7 +17,7 @@ export default class Meta extends Builder { node .getAttribute('effects')! .split(',') - .map(c => c.trim()), + .map(e => e.trim()), node ); for (const effect of effects) { @@ -40,6 +40,7 @@ export default class Meta extends Builder { const classNames = node .getAttribute('effects')! .split(',') + .map(e => e.trim()) .map(e => `e-${e}`) .join(' '); const span = spec.doc.createElement('span'); diff --git a/src/Spec.ts b/src/Spec.ts index 95315b90..c11256d0 100644 --- a/src/Spec.ts +++ b/src/Spec.ts @@ -1456,14 +1456,14 @@ ${this.opts.multipage ? `
m s.trim())
.forEach(oid => {
const s = spec.doc.createElement('span');
diff --git a/src/Xref.ts b/src/Xref.ts
index 936e60d9..64902074 100644
--- a/src/Xref.ts
+++ b/src/Xref.ts
@@ -46,13 +46,19 @@ export default class Xref extends Builder {
node.parentElement.children[0] === node
) {
if (node.parentElement.hasAttribute('effects')) {
- const addEffects = node.parentElement.getAttribute('effects')!.split(',');
+ const addEffects = node.parentElement
+ .getAttribute('effects')!
+ .split(',')
+ .map(e => e.trim());
if (addEffects.length !== 0) {
this.addEffects = validateEffects(spec, addEffects, node.parentElement);
}
}
if (node.parentElement.hasAttribute('suppress-effects')) {
- const suppressEffects = node.parentElement.getAttribute('suppress-effects')!.split(',');
+ const suppressEffects = node.parentElement
+ .getAttribute('suppress-effects')!
+ .split(',')
+ .map(e => e.trim());
if (suppressEffects.length !== 0) {
this.suppressEffects = validateEffects(spec, suppressEffects, node.parentElement);
}
diff --git a/src/cli.ts b/src/cli.ts
index 8d02b300..d7099cd5 100644
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -156,9 +156,11 @@ const build = debounce(async function build() {
warnings.push(err);
};
+ // Respect a reproducible build timestamp.
+ // https://reproducible-builds.org/specs/source-date-epoch/
if (process.env.SOURCE_DATE_EPOCH) {
const sde = process.env.SOURCE_DATE_EPOCH.trim();
- if (!/^[0-9]+/.test(sde)) {
+ if (!/^[0-9]+$/.test(sde)) {
fail(`SOURCE_DATE_EPOCH value ${sde} is not valid`);
}
const ts = +sde;