diff options
author | Prabhu Ramachandran | 2016-07-27 11:54:12 +0530 |
---|---|---|
committer | GitHub | 2016-07-27 11:54:12 +0530 |
commit | 344e1e804cee214c0d0f5c41ca16d871e786d4c3 (patch) | |
tree | 0e5fc1602698e2fd951479c219623ed666ffd03a /yaksh/templates | |
parent | cc979dfe4893ba1d7bd66649716c490c15118879 (diff) | |
parent | e15fab2d7563c8fd3ae650c0f8b00cfda9b63752 (diff) | |
download | online_test-344e1e804cee214c0d0f5c41ca16d871e786d4c3.tar.gz online_test-344e1e804cee214c0d0f5c41ca16d871e786d4c3.tar.bz2 online_test-344e1e804cee214c0d0f5c41ca16d871e786d4c3.zip |
Merge pull request #118 from ankitjavalkar/fix-codemirror-syntax
Minor changes in codemirror and setup.py
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/question.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 54fb30b..40d4482 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -224,9 +224,19 @@ function call_skip(url) // Get the textarea node var textarea_node = document.querySelector('#answer'); + var lang = "{{ question.language }}" + var mode_dict = { + 'python': 'python', + 'c': 'text/x-csrc', + 'cpp': 'text/x-c++src', + 'java': 'text/x-java', + 'bash': 'text/x-sh', + 'scilab': 'text/x-csrc' + } + // Code mirror Options var options = { - mode: "{{ question.language }}", + mode: mode_dict[lang], gutter: true, lineNumbers: true, |