From c1b4b30ab5a3195b57560b87fdaf569d150a56f6 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 28 Nov 2009 21:32:46 +0000 Subject: [PATCH] Output target if name is not defined. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32225 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetHyperlink.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } -- 2.39.5