Author: rgheck
Date: Fri Nov  5 15:50:27 2010
New Revision: 36108
URL: http://www.lyx.org/trac/changeset/36108

Log:
I forgot that the single line case is really OK.

Modified:
   lyx-devel/trunk/lib/lyx2lyx/lyx2lyx_tools.py

Modified: lyx-devel/trunk/lib/lyx2lyx/lyx2lyx_tools.py
==============================================================================
--- lyx-devel/trunk/lib/lyx2lyx/lyx2lyx_tools.py        Fri Nov  5 15:48:45 
2010        (r36107)
+++ lyx-devel/trunk/lib/lyx2lyx/lyx2lyx_tools.py        Fri Nov  5 15:50:27 
2010        (r36108)
@@ -22,13 +22,14 @@
 from parser_tools import find_token
 from unicode_symbols import unicode_reps
 
-# Note that text can be either a list of lines or a single line.
+# This will accept either a list of lines or a single line.
+# But it is bad practice to pass something with embedded
+# newlines, though we will handle that.
 def add_to_preamble(document, text):
     """ Add text to the preamble if it is not already there.
     Only the first line is checked!"""
 
     if not type(text) is list:
-      document.warning("You should pass a list to add_to_preamble!")
       # split on \n just in case
       # it'll give us the one element list we want
       # if there's no \n, too
@@ -46,7 +47,6 @@
     """ Insert text to the preamble at a given line"""
     
     if not type(text) is list:
-      document.warning("You should pass a list to insert_to_preamble!")
       # split on \n just in case
       # it'll give us the one element list we want
       # if there's no \n, too

Reply via email to