mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +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())
|
||||||
|
attr += " id='" + parid + "'";
|
||||||
if (parid_.empty())
|
attr_ = attr;
|
||||||
return output;
|
|
||||||
|
|
||||||
string const pattr = "id='" + parid_ + "'";
|
|
||||||
output += html::CompTag("a", pattr).writeTag();
|
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,16 +117,10 @@ struct CompTag
|
|||||||
struct ParTag : public StartTag
|
struct ParTag : public StartTag
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
explicit ParTag(std::string const & tag, std::string const & attr,
|
explicit ParTag(std::string const & tag, std::string attr,
|
||||||
std::string const & parid)
|
std::string const & parid);
|
||||||
: StartTag(tag, attr), parid_(parid)
|
|
||||||
{}
|
|
||||||
///
|
///
|
||||||
~ParTag() {}
|
~ParTag() {}
|
||||||
///
|
|
||||||
docstring writeTag() const;
|
|
||||||
/// the "magic par label" for this paragraph
|
|
||||||
std::string parid_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user