Skip to content

Commit 90d607a

Browse files
committed
Fix math extension
1 parent de0d5d3 commit 90d607a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

conf/public/js/asciidoctor-extension-helpers.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ function asciimathWrap(content) {
99
function parseStems(parent, content, nodename) {
1010

1111
var finalContent = content;
12-
var name = nodename.toLowerCase();
12+
var name = nodename.replace(/_/g,"").toLowerCase();
1313

14-
var stemAttr = parent.$document().$attr('stem', "asciimath");
14+
var stemAttr = parent.$document().$attr('stem', "no_stem");
15+
16+
// :stem: -> ""
17+
if (stemAttr == "" || !stemAttr) {
18+
stemAttr = "asciimath";
19+
}
1520

1621
stemAttr = stemAttr.toLowerCase();
1722

0 commit comments

Comments
 (0)