commit db954caf8b19879b9ae82f290fb429063ae2e37f
Author: Richard Heck <[email protected]>
Date:   Fri Jul 8 16:38:37 2016 -0400

    Write magic paragraph label to main paragraph tag.
---
 src/output_xhtml.cpp |   15 ++++++---------
 src/output_xhtml.h   |   10 ++--------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index c6b3c78..cc43e62 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -135,16 +135,13 @@ docstring EndTag::writeEndTag() const
 }
 
 
-docstring ParTag::writeTag() const
+ParTag::ParTag(std::string const & tag, std::string attr,
+       std::string const & parid)
+  : StartTag(tag)
 {
-       docstring output = StartTag::writeTag();
-
-       if (parid_.empty())
-               return output;
-
-       string const pattr = "id='" + parid_ + "'";
-       output += html::CompTag("a", pattr).writeTag();
-       return output;
+       if (!parid.empty())
+               attr += " id='" + parid + "'";
+       attr_ = attr;
 }
 
 
diff --git a/src/output_xhtml.h b/src/output_xhtml.h
index a2eac95..2b17047 100644
--- a/src/output_xhtml.h
+++ b/src/output_xhtml.h
@@ -117,16 +117,10 @@ struct CompTag
 struct ParTag : public StartTag
 {
        ///
-       explicit ParTag(std::string const & tag, std::string const & attr,
-              std::string const & parid)
-         : StartTag(tag, attr), parid_(parid)
-       {}
+       explicit ParTag(std::string const & tag, std::string attr,
+              std::string const & parid);
        ///
        ~ParTag() {}
-       ///
-       docstring writeTag() const;
-       /// the "magic par label" for this paragraph
-       std::string parid_;
 };
 
 

Reply via email to