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/%22%7Burl%7D/%22https:/image.com/%7Bpost.url%7D?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 && [ + , + , + ]} ); }