From: Lars Gullik Bjønnes Date: Wed, 1 Dec 1999 09:07:41 +0000 (+0000) Subject: literate fix from Kayvan A. Sylvan X-Git-Tag: 1.6.10~22493 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0f95478223a392352922beb64921819e186008ab;p=features.git literate fix from Kayvan A. Sylvan git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@345 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index c893aaa30a..db8555f94d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-11-30 Kayvan A. Sylvan + + * src/ImportNoweb.C (documentclass): fixed bounds for substr + operation, yielding correct results for the reLyX command. + 1999-12-01 Lars Gullik Bjønnes * src/support/filetools.C (ExpandPath): removed an over eager diff --git a/src/ImportNoweb.C b/src/ImportNoweb.C index 48d03dc36b..fd8d5f88de 100644 --- a/src/ImportNoweb.C +++ b/src/ImportNoweb.C @@ -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; } }