Skip to content

Commit

Permalink
fix ordering of paragraph properties
Browse files Browse the repository at this point in the history
strXmlParaSpc needs to be after strXmlLnSpc in order for them both
to take effect.

observed previous behavior: applying paraSpaceBefore and lineSpacing
together would result in only paraSpaceBefore being visible in PPT.
  • Loading branch information
sleepylemur committed Jan 23, 2019
1 parent 7e670b1 commit 8acbe23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/pptxgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4229,8 +4229,9 @@ var PptxGenJS = function(){
}

// Close Paragraph-Properties --------------------
// IMPORTANT: strXmlLnSpc must precede strXmlBullet for bullet lineSpacing to work (PPT-Online)
paragraphPropXml += '>'+ strXmlParaSpc + strXmlLnSpc + strXmlBullet;
// IMPORTANT: strXmlLnSpc, strXmlParaSpc, and strXmlBullet require strict ordering.
// anything out of order is ignored. (PPT-Online, PPT for Mac)
paragraphPropXml += '>' + strXmlLnSpc + strXmlParaSpc + strXmlBullet;
if (isDefault) {
paragraphPropXml += genXmlTextRunProperties(textObj.options, true);
}
Expand Down

0 comments on commit 8acbe23

Please sign in to comment.