Skip to content

Commit c5fefe7

Browse files
committed
render as:name and schema:name as potential labels
1 parent a92be35 commit c5fefe7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/utils/label.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export function label (x, initialCap) {
5555
kb.any(x, kb.sym('http://www.w3.org/2001/04/roadmap/org#name')) ||
5656
kb.any(x, UI.ns.cal('summary')) ||
5757
kb.any(x, UI.ns.foaf('nick')) ||
58+
kb.any(x, UI.ns.as('name')) ||
59+
kb.any(x, UI.ns.schema('name')) ||
5860
kb.any(x, UI.ns.rdfs('label'))
5961

6062
if (lab1) {

test/unit/utils/label.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ describe('label', () => {
2828
'http://www.w3.org/2001/04/roadmap/org#name',
2929
'http://www.w3.org/2002/12/cal/ical#summary',
3030
'http://xmlns.com/foaf/0.1/nick',
31-
'http://www.w3.org/2000/01/rdf-schema#label'
31+
'http://www.w3.org/2000/01/rdf-schema#label',
32+
'https://www.w3.org/ns/activitystreams#name',
33+
'http://schema.org/name'
3234
])('renders %s as label', (property) => {
3335
store.add(thing, sym(property), lit('the label'), thing.doc())
3436
const result = label(thing)

0 commit comments

Comments
 (0)