From: Dessalines Date: Wed, 16 Dec 2020 00:21:08 +0000 (-0600) Subject: Converting html tags description field from md to html. Fixes #110 X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/test?a=commitdiff_plain;h=222c9cee1d6fed0bebe0b69f89f5176a1615f464;p=lemmy-ui.git Converting html tags description field from md to html. Fixes #110 --- diff --git a/src/shared/components/html-tags.tsx b/src/shared/components/html-tags.tsx index 06fd687..ff30fb3 100644 --- a/src/shared/components/html-tags.tsx +++ b/src/shared/components/html-tags.tsx @@ -1,6 +1,7 @@ import { Component } from 'inferno'; import { Helmet } from 'inferno-helmet'; import { httpExternalPath } from '../env'; +import { md } from '../utils'; interface HtmlTagsProps { title: string; @@ -18,34 +19,37 @@ export class HtmlTags extends Component { {/* Primary Meta Tags */} - {this.props.description && ( - - )} {/* Open Graph / Facebook */} - {this.props.description && ( - - )} - {this.props.image && ( - - )} {/* Twitter */} - {this.props.description && ( + + {/* Optional desc and images */} + {this.props.description && [ + , + , - )} - {this.props.image && ( - - )} + content={md.renderInline(this.props.description)} + />, + ]} + + {this.props.image && [ + , + , + ]} ); }