mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix concatenation bug introduced in rev 21363 and simplify the code a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21370 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
668ed52302
commit
16441a6914
@ -120,18 +120,13 @@ int InsetHyperlink::latex(Buffer const &, odocstream & os,
|
||||
|
||||
} // end if (!name.empty())
|
||||
|
||||
//for the case there is no name given, the target is set as name
|
||||
docstring const urlname = url;
|
||||
// set the hyperlink type
|
||||
url += getParam("type");
|
||||
|
||||
if (runparams.moving_arg)
|
||||
os << "\\protect";
|
||||
//set the target for the name when no name is given
|
||||
if (!name.empty())
|
||||
os << "\\href{" << url << "}{" << name << '}';
|
||||
else
|
||||
os << "\\href{" << url << "}{" << urlname << '}';
|
||||
|
||||
//for the case there is no name given, the target is set as name
|
||||
os << "\\href{" << getParam("type") << url << "}{"
|
||||
<< (name.empty()? url : name) << '}';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user