File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 54
54
};
55
55
let docURL = docURLBase ;
56
56
let activeTabID = ' code' ;
57
+ let docKey = ' ' ;
57
58
stateStore .subscribe (({ code , editorMode }: ValidatedState ) => {
58
59
activeTabID = editorMode ;
59
60
const codeTypeMatch = / ([\S ] + )[\s\n ] / .exec (code );
60
61
if (codeTypeMatch && codeTypeMatch .length > 1 ) {
61
- const docKey = codeTypeMatch [1 ];
62
+ docKey = codeTypeMatch [1 ];
62
63
const docConfig = docMap [docKey ] ?? { code: ' ' };
63
64
docURL = docURLBase + (docConfig [editorMode ] ?? docConfig .code ?? ' ' );
64
65
}
133
134
on:click ={syncDiagram }><i class =" fas fa-sync" /></button >
134
135
{/if }
135
136
136
- <button class =" btn btn-secondary btn-xs" title =" View documentation" >
137
+ <button
138
+ class =" btn btn-secondary btn-xs"
139
+ title ="View documentation for {docKey .replace (' Diagram' , ' ' )} diagram" >
137
140
<a target ="_blank" rel ="noreferrer" href ={docURL } data-cy =" docs" >
138
141
<i class =" fas fa-book mr-1" />Docs
139
142
</a >
You can’t perform that action at this time.
0 commit comments