/*============================================================================= Copyright (c) 2002 2004 2006 Joel de Guzman Copyright (c) 2004 Eric Niebler http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #include "markups.hpp" #include #include #include "block_tags.hpp" #include "for.hpp" #include "phrase_tags.hpp" #include "quickbook.hpp" namespace quickbook { namespace detail { std::map markups; void initialise_markups() { markup init_markups[] = { {block_tags::paragraph, "\n", "\n"}, {block_tags::paragraph_in_list, "\n", "\n"}, {block_tags::blurb, "\n", "\n"}, {block_tags::blockquote, "
", "
"}, {block_tags::preformatted, "", ""}, {block_tags::warning, "", ""}, {block_tags::caution, "", ""}, {block_tags::important, "", ""}, {block_tags::note, "", ""}, {block_tags::tip, "", ""}, {block_tags::block, "", ""}, {block_tags::ordered_list, "", ""}, {block_tags::itemized_list, "", ""}, {block_tags::hr, "", 0}, {phrase_tags::url, ""}, {phrase_tags::link, ""}, {phrase_tags::funcref, ""}, {phrase_tags::classref, ""}, {phrase_tags::memberref, ""}, {phrase_tags::enumref, ""}, {phrase_tags::macroref, ""}, {phrase_tags::headerref, ""}, {phrase_tags::conceptref, ""}, {phrase_tags::globalref, ""}, {phrase_tags::bold, "", ""}, {phrase_tags::italic, "", ""}, {phrase_tags::underline, "", ""}, {phrase_tags::teletype, "", ""}, {phrase_tags::strikethrough, "", ""}, {phrase_tags::quote, "", ""}, {phrase_tags::replaceable, "", ""}, {phrase_tags::escape, "", ""}, {phrase_tags::break_mark, "\n", 0}}; QUICKBOOK_FOR (markup m, init_markups) { markups[m.tag] = m; } } markup const& get_markup(value::tag_type t) { return markups[t]; } std::ostream& operator<<(std::ostream& out, markup const& m) { return out << "{" << m.tag << ": \"" << m.pre << "\", \"" << m.post << "\"}"; } } }