Skip to content

Commit

Permalink
fix: render proper HTML instead of raw markdown in og:description(#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebqq authored and endiliey committed Oct 24, 2018
1 parent 3e901f8 commit 06e243a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v1/lib/core/DocsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Container = require('./Container.js');
const Doc = require('./Doc.js');
const DocsSidebar = require('./DocsSidebar.js');
const OnPageNav = require('./nav/OnPageNav.js');
const renderMarkdown = require('./renderMarkdown');
const Site = require('./Site.js');
const translation = require('../server/translation.js');
const docs = require('../server/docs.js');
Expand Down Expand Up @@ -76,7 +77,7 @@ class DocsLayout extends React.Component {
separateOnPageNav: hasOnPageNav,
})}
title={title}
description={content.trim().split('\n')[0]}
description={renderMarkdown(content.trim().split('\n')[0])}
language={metadata.language}
version={metadata.version}
metadata={metadata}>
Expand Down

0 comments on commit 06e243a

Please sign in to comment.