Skip to content

Commit

Permalink
Merge pull request #62 from abap34/dev
Browse files Browse the repository at this point in the history
ソースコードのデフォルト入力が正常に反映されていなかった問題を修正
  • Loading branch information
abap34 authored Mar 6, 2024
2 parents 29f5342 + a2f8c87 commit e05403e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ namespace almo {

// ace editor の設定をする.
// テーマは meta_data から取得する.

std::string source_code = join(read_file(source), "\n");

std::string ace_editor = ""
"<script>"
"editor = ace.edit(\"" + uuid + "\"); "
Expand All @@ -489,7 +492,7 @@ namespace almo {
" fontSize: \"14px\""
"});"
"editor.renderer.setScrollMargin(10, 10);"
"editor.setValue(`" + source + "`, -1);"
"editor.setValue(`" + source_code + "`, -1);"
"</script>\n";

// サンプル入力を読み込む.
Expand Down

0 comments on commit e05403e

Please sign in to comment.