diff --git a/www/src/python_tokenizer.js b/www/src/python_tokenizer.js
index <HASH>..<HASH> 100644
--- a/www/src/python_tokenizer.js
+++ b/www/src/python_tokenizer.js
@@ -71,8 +71,9 @@ function TokenError(message, position){
 
 function get_line_at(src, pos){
     // Get the line in source code src starting at position pos
-    var end = src.substr(pos).search(/[\r\n]/)
-    return end == -1 ? src.substr(pos) : src.substr(pos, end + 1)
+    var end = src.substr(pos).search(/[\r\n]/),
+        line = end == -1 ? src.substr(pos) : src.substr(pos, end + 1)
+    return line + '\n'
 }
 
 function get_comment(src, pos, line_num, line_start, token_name, line){
Attribute .line of tokens generated by python_tokenizer.js ends with "\n"