summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorankitjavalkar2016-07-25 17:30:03 +0530
committerankitjavalkar2016-07-25 17:30:03 +0530
commite15fab2d7563c8fd3ae650c0f8b00cfda9b63752 (patch)
tree57f106f7c3d9ab9025819dece66ac810ae2f466c /yaksh
parent73552024136f906f2af0c5f2737216f2db1310e9 (diff)
downloadonline_test-e15fab2d7563c8fd3ae650c0f8b00cfda9b63752.tar.gz
online_test-e15fab2d7563c8fd3ae650c0f8b00cfda9b63752.tar.bz2
online_test-e15fab2d7563c8fd3ae650c0f8b00cfda9b63752.zip
- Fix syntax highlighting for c, java, shell and scilab
- Add social-auth to setup.py
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templates/yaksh/question.html12
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,