Put one more 0 in another font.
[matthijs/master-project/report.git] / pret-haskell.lua
index 4ce8d3e..ca3a165 100644 (file)
@@ -40,6 +40,13 @@ function visualizer.flush_line(str,nested)
                 ctxsprint('}')
                 -- Eat the processed characters
                 str = rest
+            elseif utf.match(str, "^%-%-") then
+                ctxsprint('{\\italic{--')
+                -- Recursively call ourselves to handle spaces gracefully.
+                visualizer.flush_line(utf.sub(str, 3))
+                ctxsprint('}}')
+                -- Done with this line
+                str = ''
             else
                 -- Write the first character
                 texwrite(utf.sub(str, 1, 1))