Not a real obstacle, because we can do this kind of thing directly with the XML of each row, but as far as I can see, the .link
property of each attribute run
in the .textContent
of a row:
- always returns a non-empty HTML string (whether or not there is in fact a link in that attribute run)
- but the string returned always has
"undefined"
as thehref
value (rather than a URL string) even for runs which do have an attribute attached to them.
Test script (in JS):
Expand disclosure triangle to view JS source
(() => {
"use strict";
const doc = Application("Bike").documents.at(0);
return doc.exists() ? (
doc.rows.where({
_not: [{name: ""}]
})()
.flatMap(
row => row.textContent.attributeRuns()
.map(run => run.link())
)
) : "No document open in Bike.";
})();
macOS 13.3.1 Bike 1.11.1