diff --git a/assets/js/handlebars/templates/tooltip-body.handlebars b/assets/js/handlebars/templates/tooltip-body.handlebars
index 9ee40d1ca..95264d449 100644
--- a/assets/js/handlebars/templates/tooltip-body.handlebars
+++ b/assets/js/handlebars/templates/tooltip-body.handlebars
@@ -11,7 +11,7 @@
{{#if this.hint.description}}
- {{this.hint.description}}
+ {{{this.hint.description}}}
{{/if}}
{{/if}}
diff --git a/assets/js/tooltips/hints.js b/assets/js/tooltips/hints.js
index d34767026..7f9492809 100644
--- a/assets/js/tooltips/hints.js
+++ b/assets/js/tooltips/hints.js
@@ -154,7 +154,7 @@ export function extractFunctionHint (element) {
const title = heading.textContent
const firstParagraph = element.querySelector('.docstring > p')
- const description = firstParagraph ? firstParagraph.textContent : ''
+ const description = firstParagraph ? firstParagraph.innerHTML : ''
return {
kind: HINT_KIND.function,
@@ -174,7 +174,7 @@ export function extractModuleHint (content) {
const title = heading.textContent
const firstParagraph = content.querySelector('#moduledoc p')
- const description = firstParagraph ? firstParagraph.textContent : ''
+ const description = firstParagraph ? firstParagraph.innerHTML : ''
return {
kind: HINT_KIND.module,
diff --git a/assets/test/tooltips/hints.spec.js b/assets/test/tooltips/hints.spec.js
index 762c09eeb..c1673fe8e 100644
--- a/assets/test/tooltips/hints.spec.js
+++ b/assets/test/tooltips/hints.spec.js
@@ -28,7 +28,7 @@ describe('hints extraction', () => {
it('extracts hint info', () => {
expect(extractModuleHint(modulePageObject).title).to.eql('Some module')
- expect(extractModuleHint(modulePageObject).description).to.eql('Module description here')
+ expect(extractModuleHint(modulePageObject).description).to.eql('Module description here')
expect(extractModuleHint(modulePageObject).kind).to.eql('module')
})
})