Markupsimplifier does not simplify when only settings.RemoveSoftHyphens or settings.RemoveLastRenderedPageBreak is set to true.
When one of the other Settings is true too then it does remove softhypens or LastRenderedPageBreak.
my suggestion for solution:
in MarkupSimplifier.cs -> SimplifyMarkupForPart
add the following 2 lines in the If Statement beginning in line 561
settings.RemoveSoftHyphens ||
settings.RemoveLastRenderedPageBreak ||
current code:
var prevNewRoot = new XDocument(newRoot);
while (true)
{
if (settings.RemoveComments ||
settings.RemoveEndAndFootNotes ||
settings.ReplaceTabsWithSpaces ||
settings.RemoveFieldCodes ||
settings.RemovePermissions ||
settings.RemoveProof ||
settings.RemoveBookmarks ||
settings.RemoveWebHidden ||
settings.RemoveGoBackBookmark ||
settings.RemoveHyperlinks)
newRoot = (XElement) SimplifyMarkupTransform(newRoot, settings, parameters);
Closing all issues as this repo is being archived and will no longer be maintained by Microsoft. The project is licensed for continued use and development by forking to your own repo.
Markupsimplifier does not simplify when only settings.RemoveSoftHyphens or settings.RemoveLastRenderedPageBreak is set to true. When one of the other Settings is true too then it does remove softhypens or LastRenderedPageBreak. my suggestion for solution: in MarkupSimplifier.cs -> SimplifyMarkupForPart add the following 2 lines in the If Statement beginning in line 561 settings.RemoveSoftHyphens || settings.RemoveLastRenderedPageBreak ||
current code: var prevNewRoot = new XDocument(newRoot); while (true) { if (settings.RemoveComments || settings.RemoveEndAndFootNotes || settings.ReplaceTabsWithSpaces || settings.RemoveFieldCodes || settings.RemovePermissions || settings.RemoveProof || settings.RemoveBookmarks || settings.RemoveWebHidden || settings.RemoveGoBackBookmark || settings.RemoveHyperlinks) newRoot = (XElement) SimplifyMarkupTransform(newRoot, settings, parameters);