mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Don't hardcode listings but use InsetLayout.
This commit is contained in:
parent
f623ded109
commit
99402cd09c
@ -230,6 +230,7 @@ InsetLayout Listings
|
||||
FreeSpacing true
|
||||
ForceLTR true
|
||||
RefPrefix lst
|
||||
HTMLTag pre
|
||||
End
|
||||
|
||||
InsetLayout Branch
|
||||
|
@ -280,11 +280,18 @@ docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const
|
||||
<< caption << html::EndTag("div");
|
||||
}
|
||||
|
||||
out << html::StartTag("pre");
|
||||
InsetLayout const & il = getLayout();
|
||||
string const tag = il.htmltag();
|
||||
string attr = "class ='listings";
|
||||
string const lang = params().getParamValue("language");
|
||||
if (!lang.empty())
|
||||
attr += " " + lang;
|
||||
attr += "'";
|
||||
out << html::StartTag(tag, attr);
|
||||
OutputParams newrp = rp;
|
||||
newrp.html_disable_captions = true;
|
||||
docstring def = InsetText::insetAsXHTML(out, newrp, InsetText::JustText);
|
||||
out << html::EndTag("pre");
|
||||
out << html::EndTag(tag);
|
||||
|
||||
if (isInline) {
|
||||
out << html::CompTag("br");
|
||||
|
Loading…
Reference in New Issue
Block a user