]> git.lyx.org Git - features.git/commitdiff
literate fix from Kayvan A. Sylvan
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 1 Dec 1999 09:07:41 +0000 (09:07 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 1 Dec 1999 09:07:41 +0000 (09:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@345 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/ImportNoweb.C

index c893aaa30aa70abcf766bd300e71e4e70b8c006b..db8555f94dcb1e218f97e238f20873b43c1e076b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-11-30  Kayvan A. Sylvan  <kayvan@satyr.sylvan.com>
+
+       * src/ImportNoweb.C (documentclass): fixed bounds for substr
+         operation, yielding correct results for the reLyX command.
+
 1999-12-01  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/support/filetools.C (ExpandPath): removed an over eager
index 48d03dc36b2df06b78376d507424d735ce3ca9b4..fd8d5f88de48bd2570b673c06909d8305d141ec4 100644 (file)
@@ -54,10 +54,6 @@ string ImportNoweb::documentclass()
 {
        string result = "literate-article"; // Default
 
-#warning If you use literate programming you should verify that this works
-       // This method has been rewritten to use ifstream, but since I
-       // don't use literate programming myself I am unable to check
-       // this correclty. (Lgb)
        ifstream ifs(file.c_str());
 
        if (!ifs) return "nofile"; // Should not happen!
@@ -67,7 +63,7 @@ string ImportNoweb::documentclass()
                if (p != string::npos) {
                        p = line.find('{', p);
                        string::size_type q = line.find('}', p);
-                       result = "literate-" + line.substr(p, q - p);
+                       result = "literate-" + line.substr(p + 1, q - p - 1);
                        break;
                }
        }