diff --git a/src/source.cpp b/src/source.cpp index 901b4f9..1a10ff9 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -88,6 +89,14 @@ Glib::RefPtr Source::guess_language(const boost::filesystem::path } } } + else { + std::ifstream input(file_path.string(), std::ios::binary); + std::string tag(5, '\0'); + if(input && input.read(&tag[0], static_cast(tag.size()))) { + if(tag == "get_language("xml"); + } + } } else if(language->get_id() == "cuda") { if(file_path.extension() == ".cuh")