Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51405 - trunk/tools/quickbook/detail
From: daniel_james_at_[hidden]
Date: 2009-02-22 18:49:22


Author: danieljames
Date: 2009-02-22 18:49:21 EST (Sun, 22 Feb 2009)
New Revision: 51405
URL: http://svn.boost.org/trac/boost/changeset/51405

Log:
Print out unexpected characters as errors.

Ref #1170
Text files modified:
   trunk/tools/quickbook/detail/actions.cpp | 6 +++++-
   trunk/tools/quickbook/detail/quickbook.cpp | 2 +-
   2 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2009-02-22 18:49:21 EST (Sun, 22 Feb 2009)
@@ -251,7 +251,11 @@
             << ", unexpected character: " << std::string(first, last)
             << "\n";
 
- out << '#'; // print out an unexpected character
+ // print out an unexpected character
+ out << "<phrase role=\"error\">";
+ while (first != last)
+ detail::print_char(*first++, out.get());
+ out << "</phrase>";
     }
 
     void anchor_action::operator()(iterator first, iterator last) const

Modified: trunk/tools/quickbook/detail/quickbook.cpp
==============================================================================
--- trunk/tools/quickbook/detail/quickbook.cpp (original)
+++ trunk/tools/quickbook/detail/quickbook.cpp 2009-02-22 18:49:21 EST (Sun, 22 Feb 2009)
@@ -91,7 +91,7 @@
         
         if(actor.error_count)
         {
- detail::outerr(filein_, -1)
+ detail::outerr(filein_)
                     << "Error count: " << actor.error_count << ".\n";
         }
 


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