Skip to content

Commit

Permalink
Add markup in tree view and concept page #287
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 6, 2024
1 parent af66e5c commit a5180c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Concept.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Concept = ({

return (
<div className="content block main-block" id={getDomId(concept.id)}>
<h1 style={{ color: "red" }}>{concept.deprecated ? "Deprecated" : ""}</h1>
<h1>
{concept.notation && <span>{concept.notation.join(",")}&nbsp;</span>}
{i18n(language)(concept.prefLabel)}
Expand Down
3 changes: 3 additions & 0 deletions src/components/nestedList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ const NestedList = ({
const renderPrefLabel = () => {
// Function for handling highlighting
function handleHighlight(text, highlight) {
text = item.deprecated
? `<span style="color: red">(DEPRECATED)</span> ${text}`
: text
if (highlight) {
return text.replace(highlight, (str) => `<strong>${str}</strong>`)
} else {
Expand Down
1 change: 1 addition & 0 deletions src/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ module.exports.allConceptScheme = (languages) => `
example {
${[...languages].join(" ")}
}
deprecated
}
`
module.exports.tokenizer = `{
Expand Down

0 comments on commit a5180c1

Please sign in to comment.