From: Richard Heck Date: Sat, 28 Nov 2009 21:32:46 +0000 (+0000) Subject: Output target if name is not defined. X-Git-Tag: 2.0.0~5000 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c1b4b30ab5a3195b57560b87fdaf569d150a56f6;p=lyx.git Output target if name is not defined. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32225 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 6351f15322..79908011fa 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -184,8 +184,10 @@ int InsetHyperlink::docbook(odocstream & os, OutputParams const &) const docstring InsetHyperlink::xhtml(XHTMLStream & xs, OutputParams const &) const { - xs << StartTag("a", to_utf8("href=\"" + getParam("target") + "\"")); - xs << getParam("name"); + docstring const & target = getParam("target"); + docstring const & name = getParam("name"); + xs << StartTag("a", to_utf8("href=\"" + target + "\"")); + xs << (name.empty() ? target : name); xs << EndTag("a"); return docstring(); }