diff --git a/data.json b/data.json index 8bfd538..377b850 100644 --- a/data.json +++ b/data.json @@ -35538,13 +35538,8 @@ "children": [], "title": [ [ - "Link", - { - "url": ["Search", "Videos"], - "label": [["Plain", ""]], - "full_text": "[[Videos]]", - "metadata": "" - } + "Tag", + [["Plain", "Videos"]] ] ], "body": [], diff --git a/src/components/LSInline.js b/src/components/LSInline.js index 212ad9f..2f0a787 100644 --- a/src/components/LSInline.js +++ b/src/components/LSInline.js @@ -2,6 +2,7 @@ import { getInlineContent, getInlineType, isInlineContainer } from '../utils' import LSBlockReference from './LSBlockReference' import LSInlines from './LSInlines' import LSLink from './LSLink' +import LSTag from './LSTag' import LSSrc from './LSSrc' import LSTable from './LSTable' @@ -31,6 +32,7 @@ function Emphasis({ c }) { const INLINE_RENDERERS = { Plain, Link: LSLink, + Tag: LSTag, Block_reference: LSBlockReference, Code, Src: LSSrc, diff --git a/src/components/LSTag.js b/src/components/LSTag.js new file mode 100644 index 0000000..4b19a88 --- /dev/null +++ b/src/components/LSTag.js @@ -0,0 +1,15 @@ +import { pageNames } from '../utils' +import PageLink from './PageLink' + +export default function LSTag({ c }) { + const tag = c[0] + const tagType = tag[0] + if (tagType === 'Plain') { + const toPage = c[0][1] + if (pageNames.includes(toPage)) { + return + } else { + return toPage + } + } +}