diff --git a/modules/ui/curtain.js b/modules/ui/curtain.js
index b58a2f479..9fa08ad7f 100644
--- a/modules/ui/curtain.js
+++ b/modules/ui/curtain.js
@@ -66,7 +66,7 @@ export function uiCurtain(containerNode) {
* @param {function} [options.padding] extra margin in px to put around bbox
* @param {String|ClientRect} [options.tooltipBox] box for tooltip position, if different from box for the curtain
*/
- curtain.reveal = function(box, text, options) {
+ curtain.reveal = function(box, html, options) {
options = options || {};
if (typeof box === 'string') {
@@ -100,12 +100,16 @@ export function uiCurtain(containerNode) {
tooltipBox = box;
}
- if (tooltipBox && text) {
- // pseudo markdown bold text for the instruction section..
- var parts = text.split('**');
- var html = parts[0] ? '' + parts[0] + '' : '';
- if (parts[1]) {
- html += '' + parts[1] + '';
+ if (tooltipBox && html) {
+
+ if (html.indexOf('**') !== -1) {
+ if (html.indexOf(')(.+?)(\*\*)/, '$1$2$3');
+ } else {
+ html = html.replace(/^(.+?)(\*\*)/, '$1$2');
+ }
+ // pseudo markdown bold text for the instruction section..
+ html = html.replace(/\*\*(.*?)\*\*/g, '$1');
}
html = html.replace(/\*(.*?)\*/g, '$1'); // emphasis