File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " backstage-plugin-techdocs-addon-mathjax" ,
3
- "version" : " 0.0.3 " ,
3
+ "version" : " 0.0.4a " ,
4
4
"main" : " src/index.ts" ,
5
5
"types" : " src/index.ts" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -27,14 +27,16 @@ let mathjaxPromise = init(mathjaxConfig);
27
27
28
28
async function processMathjax ( preBlock : any ) {
29
29
if ( ! mathjax ) {
30
+ console . log ( "Mathjax not found. Loading Mathjax!" ) ;
30
31
mathjax = await mathjaxPromise ;
31
32
}
32
33
34
+ console . log ( "Found preBlock with values: " , preBlock . innerText ) ;
33
35
const blockText = preBlock . innerText ;
34
36
const svg = mathjax . tex2svg ( blockText ) ;
35
37
const svgHTML = mathjax . startup . adaptor . outerHTML ( svg ) ;
36
38
preBlock . innerHTML = svgHTML ;
37
-
39
+ console . log ( "preBlock has generated svg, now setting innerHTML to svg" ) ;
38
40
} ;
39
41
40
42
@@ -45,6 +47,7 @@ export const MathjaxAddon = () => {
45
47
useEffect ( ( ) => {
46
48
47
49
mathjaxPreBlocks . forEach ( preBlock => {
50
+ console . log ( ">>FOREACH" ) ;
48
51
processMathjax ( preBlock ) ;
49
52
} ) ;
50
53
You can’t perform that action at this time.
0 commit comments