|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53019 - trunk/tools/quickbook/detail
From: daniel_james_at_[hidden]
Date: 2009-05-15 02:12:42
Author: danieljames
Date: 2009-05-15 02:12:42 EDT (Fri, 15 May 2009)
New Revision: 53019
URL: http://svn.boost.org/trac/boost/changeset/53019
Log:
Use '.py' when checking for python files.
Text files modified:
trunk/tools/quickbook/detail/actions.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2009-05-15 02:12:42 EDT (Fri, 15 May 2009)
@@ -1082,7 +1082,8 @@
iterator_type last(code.end(), code.end());
size_t fname_len = file.size();
- bool is_python = file[--fname_len]=='y' && file[--fname_len]=='p';
+ bool is_python = fname_len >= 3
+ && file[--fname_len]=='y' && file[--fname_len]=='p' && file[--fname_len]=='.';
code_snippet_grammar g(storage, doc_id, is_python);
// TODO: Should I check that parse succeeded?
boost::spirit::classic::parse(first, last, g);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk