#include "FuncRequest.h"
#include "LaTeXFeatures.h"
#include "OutputParams.h"
+#include "output_xhtml.h"
#include "support/docstream.h"
#include "support/gettext.h"
namespace lyx {
-InsetHyperlink::InsetHyperlink(InsetCommandParams const & p)
- : InsetCommand(p, "href")
+InsetHyperlink::InsetHyperlink(Buffer * buf, InsetCommandParams const & p)
+ : InsetCommand(buf, p, "href")
{}
}
+docstring InsetHyperlink::xhtml(XHTMLStream & xs, OutputParams const &) const
+{
+ 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();
+}
+
+
void InsetHyperlink::tocString(odocstream & os) const
{
plaintext(os, OutputParams(0));