File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,18 +229,15 @@ export const initRenderer = ({
229229
230230 customRenderer . tablecell = ( content , flags ) => {
231231 const type = flags . header ? "th" : "td" ;
232- const tag = flags . align
233- ? `<${ type } align="${ flags . align } "${
234- parseCssInJsToInlineCss ( finalStyles . td ) !== ""
235- ? ` style="${ parseCssInJsToInlineCss ( finalStyles . td ) } "`
236- : ""
237- } >`
238- : `<${ type } ${
239- parseCssInJsToInlineCss ( finalStyles . td ) !== ""
240- ? ` style="${ parseCssInJsToInlineCss ( finalStyles . td ) } "`
241- : ""
242- } >`;
243- return tag + content + `</${ type } >\n` ;
232+ const styles = parseCssInJsToInlineCss (
233+ finalStyles [ flags . header ? "th" : "td" ]
234+ ) ;
235+ const tag = flags . align
236+ ? `<${ type } align="${ flags . align } "${
237+ styles !== "" ? ` style="${ styles } "` : ""
238+ } >`
239+ : `<${ type } ${ styles !== "" ? ` style="${ styles } "` : "" } >` ;
240+ return tag + content + `</${ type } >\n` ;
244241 }
245242
246243 customRenderer . tablerow = ( content ) => {
You can’t perform that action at this time.
0 commit comments