mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Write magic paragraph label to main paragraph tag.
This commit is contained in:
parent
97b9e81cee
commit
db954caf8b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user