--- a/QScintilla/MiniEditor.py Mon Nov 12 13:12:07 2012 +0100 +++ b/QScintilla/MiniEditor.py Mon Nov 12 14:42:48 2012 +0100 @@ -2580,10 +2580,17 @@ @param line0 first line of text to use in the generation process (string) """ bindName = self.__curFile + line0 = line0.lower() - if line0.startswith("<?xml"): - # override extension for XML files + # check first line if it does not start with #! + if line0.startswith(("<html", "<!doctype html", "<?php")): + bindName = "dummy.html" + elif line0.startswith(("<?xml", "<!doctype")): bindName = "dummy.xml" + elif line0.startswith("index: "): + bindName = "dummy.diff" + elif line0.startswith("\\documentclass"): + bindName = "dummy.tex" # check filetype if self.filetype in ["Python", "Python2", "Python3"]: