mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Output -- and --- in XHTML like in LaTeX
For exports based on LaTeX, consecutive hyphens are only converted to endash and emdash if the current font family is not typewriter, and if none of the parent insets is an IPA inset. Now this is done for XHTML export as well.
This commit is contained in:
parent
eaaeda65cb
commit
e4ec11e8a1
@ -3162,7 +3162,8 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
|
|||||||
|
|
||||||
if (style.pass_thru || runparams.pass_thru)
|
if (style.pass_thru || runparams.pass_thru)
|
||||||
xs << c;
|
xs << c;
|
||||||
else if (c == '-') {
|
else if (c == '-' && !runparams.inIPA &&
|
||||||
|
font.fontInfo().family() != TYPEWRITER_FAMILY) {
|
||||||
docstring str;
|
docstring str;
|
||||||
int j = i + 1;
|
int j = i + 1;
|
||||||
if (j < size() && d->text_[j] == '-') {
|
if (j < size() && d->text_[j] == '-') {
|
||||||
|
@ -231,6 +231,14 @@ void InsetIPA::latex(otexstream & os, OutputParams const & runparams_in) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docstring InsetIPA::xhtml(XHTMLStream & xs, OutputParams const & runparams_in) const
|
||||||
|
{
|
||||||
|
OutputParams runparams(runparams_in);
|
||||||
|
runparams.inIPA = true;
|
||||||
|
return InsetText::xhtml(xs, runparams);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool InsetIPA::insetAllowed(InsetCode code) const
|
bool InsetIPA::insetAllowed(InsetCode code) const
|
||||||
{
|
{
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
@ -72,6 +72,8 @@ public:
|
|||||||
///
|
///
|
||||||
void latex(otexstream &, OutputParams const &) const;
|
void latex(otexstream &, OutputParams const &) const;
|
||||||
///
|
///
|
||||||
|
docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
|
||||||
|
///
|
||||||
void validate(LaTeXFeatures & features) const;
|
void validate(LaTeXFeatures & features) const;
|
||||||
///
|
///
|
||||||
bool allowSpellCheck() const { return false; }
|
bool allowSpellCheck() const { return false; }
|
||||||
|
Loading…
Reference in New Issue
Block a user