diff --git a/src/project.cc b/src/project.cc index fd44a5f..bc1e2c1 100644 --- a/src/project.cc +++ b/src/project.cc @@ -553,7 +553,7 @@ void Project::Python::compile_and_run() { } void Project::JavaScript::compile_and_run() { - auto command="node "+filesystem::escape_argument(Notebook::get().get_current_view()->file_path.string()); + auto command="node --harmony "+filesystem::escape_argument(Notebook::get().get_current_view()->file_path.string()); Terminal::get().print("Running "+command+"\n"); Terminal::get().async_process(command, Notebook::get().get_current_view()->file_path.parent_path(), [command](int exit_status) { Terminal::get().async_print(command+" returned: "+std::to_string(exit_status)+'\n'); diff --git a/src/source.cc b/src/source.cc index c26fc0f..b037e27 100644 --- a/src/source.cc +++ b/src/source.cc @@ -272,26 +272,6 @@ Source::View::View(const boost::filesystem::path &file_path, Glib::RefPtrget_id()=="chdr" || language->get_id()=="cpphdr" || language->get_id()=="c" || language->get_id()=="cpp" || language->get_id()=="objc" || language->get_id()=="java" || language->get_id()=="js" || language->get_id()=="ts" || language->get_id()=="proto" || - language->get_id()=="c-sharp")) { + language->get_id()=="c-sharp" || language->get_id()=="html")) { is_bracket_language=true; auto_indent=[this]() { @@ -364,6 +344,26 @@ Source::View::View(const boost::filesystem::path &file_path, Glib::RefPtr Source::View::find_tab_char_and_size() { bool single_quoted=false; bool double_quoted=false; //For bracket languages, TODO: add more language ids - if(language && (language->get_id()=="chdr" || language->get_id()=="cpphdr" || language->get_id()=="c" || - language->get_id()=="cpp" || language->get_id()=="objc" || language->get_id()=="java" || - language->get_id()=="javascript")) { + if(is_bracket_language) { bool line_comment=false; bool comment=false; bool bracket_last_line=false;