]> git.lyx.org Git - lyx.git/commitdiff
Output target if name is not defined.
authorRichard Heck <rgheck@comcast.net>
Sat, 28 Nov 2009 21:32:46 +0000 (21:32 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 28 Nov 2009 21:32:46 +0000 (21:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32225 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetHyperlink.cpp

index 6351f153223de13491ddde381bf39c11b5054a24..79908011fa1a28b4289591c7e72f5039a14adacf 100644 (file)
@@ -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();
 }