Skip to content

Commit 40ab9cf

Browse files
committed
harden code of file types and apps
1 parent 5c7b572 commit 40ab9cf

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/RDFXMLPane.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export const RDFXMLPane = {
1818
audience: [ns.solid('Developer')],
1919

2020
label: function (subject, context) {
21+
// Don't match markdown files - let humanReadablePane handle those
22+
if (subject.uri && (subject.uri.endsWith('.md') || subject.uri.endsWith('.markdown'))) {
23+
return null
24+
}
2125
const store = context.session.store
2226
if (
2327
'http://www.w3.org/2007/ont/link#ProtocolEvent' in

src/dataContentPane.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export const dataContentPane = {
2222
audience: [ns.solid('Developer')],
2323

2424
label: function (subject, context) {
25+
// Don't match markdown files - let humanReadablePane handle those
26+
if (subject.uri && (subject.uri.endsWith('.md') || subject.uri.endsWith('.markdown'))) {
27+
return null
28+
}
2529
if (
2630
'http://www.w3.org/2007/ont/link#ProtocolEvent' in
2731
context.session.store.findTypeURIs(subject)

src/dokieli/dokieliPane.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ export default {
5858

5959
if (!subject.uri) return null // no bnodes
6060

61+
// Don't match markdown files - let humanReadablePane handle those
62+
const uri = subject.uri
63+
if (uri.endsWith('.md') || uri.endsWith('.markdown')) {
64+
return null
65+
}
66+
6167
const t = kb.findTypeURIs(subject)
6268
if (t[ns.link('WebPage').uri]) return 'view'
6369

src/n3Pane.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export const n3Pane = {
1717
audience: [ns.solid('Developer')],
1818

1919
label: function (subject, context) {
20+
// Don't match markdown files - let humanReadablePane handle those
21+
if (subject.uri && (subject.uri.endsWith('.md') || subject.uri.endsWith('.markdown'))) {
22+
return null
23+
}
2024
const store = context.session.store
2125
if (
2226
'http://www.w3.org/2007/ont/link#ProtocolEvent' in

0 commit comments

Comments
 (0)