Skip to content

Commit

Permalink
Added spacing before and after line containing Asian fonts in order t…
Browse files Browse the repository at this point in the history
…o keep line numbers aligned
  • Loading branch information
elvirbrk committed Feb 8, 2018
1 parent b39f759 commit b0af636
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions NoteHighlightAddin/AddIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,17 @@ private XElement PrepareFormatedContent(string htmlContent, HighLightParameter p
nr = defaultStyle + config.LineNrReplaceCh.PadLeft(5) + "</pre>";
}

cell1.Add(new XElement(ns + "OEChildren",
new XElement(ns + "OE",
XElement oeElement = new XElement(ns + "OE",
new XElement(ns + "T",
new XCData(nr)))));
new XCData(nr)));
if (ContainsAsianCharacter(itemLine))
{
oeElement.Add(new XAttribute("spaceBefore", config.AsianBeforeSpace));
oeElement.Add(new XAttribute("spaceAfter", config.AsianAfterSpace));
}

cell1.Add(new XElement(ns + "OEChildren",
oeElement ));
}
else
{
Expand Down

0 comments on commit b0af636

Please sign in to comment.