File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ extern "C" {
13
13
pub fn alert ( s : & str ) ;
14
14
}
15
15
16
- pub fn create_snapshot ( code : & str ) -> SnapshotConfig {
16
+ pub fn create_snapshot ( code : & str , language : String ) -> SnapshotConfig {
17
17
let code_content = Content :: Code (
18
18
CodeBuilder :: default ( )
19
19
. content ( code)
20
- . language ( "rust" )
20
+ . language ( language )
21
21
. build ( )
22
22
. unwrap ( ) ,
23
23
) ;
@@ -50,10 +50,10 @@ impl Snapshot {
50
50
}
51
51
52
52
#[ wasm_bindgen]
53
- pub fn take_snapshot ( code : & str ) -> Snapshot {
53
+ pub fn take_snapshot ( code : & str , language : String ) -> Snapshot {
54
54
console_error_panic_hook:: set_once ( ) ;
55
55
56
- let config = create_snapshot ( code) ;
56
+ let config = create_snapshot ( code, language ) ;
57
57
58
58
Snapshot :: new ( config)
59
59
}
You can’t perform that action at this time.
0 commit comments