From: Richard Heck Date: Fri, 8 Jul 2016 20:38:37 +0000 (-0400) Subject: Write magic paragraph label to main paragraph tag. X-Git-Tag: 2.3.0alpha1~1305 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=db954caf8b19879b9ae82f290fb429063ae2e37f;p=features.git Write magic paragraph label to main paragraph tag. --- diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index c6b3c7875d..cc43e62c08 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 a2eac95ab4..2b1704742c 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_; };