From 9f86f72cb25927eca320409ab288d98675b0a444 Mon Sep 17 00:00:00 2001 From: Jerome Simeon Date: Fri, 4 Sep 2020 10:47:00 -0400 Subject: [PATCH] fix(pdf) Do not preserve page breaks by defaults on import Signed-off-by: Jerome Simeon --- packages/markdown-pdf/src/PdfTransformer.js | 2 +- .../__snapshots__/PdfTransformer.test.js.snap | 258 ------------------ 2 files changed, 1 insertion(+), 259 deletions(-) diff --git a/packages/markdown-pdf/src/PdfTransformer.js b/packages/markdown-pdf/src/PdfTransformer.js index 61c1c1b2..b75569f4 100644 --- a/packages/markdown-pdf/src/PdfTransformer.js +++ b/packages/markdown-pdf/src/PdfTransformer.js @@ -92,7 +92,7 @@ class PdfTransformer { * @param {boolean} [options.preservePages] - whether to preserve PDF page breaks (defaults to true) * @returns {promise} a Promise to the CiceroMark DOM */ - async toCiceroMark(input, format = 'concerto', options = { paragraphVerticalOffset: 2, preservePages: true }) { + async toCiceroMark(input, format = 'concerto', options = { paragraphVerticalOffset: 2, preservePages: false }) { let loadingTask = pdfjsLib.getDocument(input.buffer); diff --git a/packages/markdown-pdf/src/__snapshots__/PdfTransformer.test.js.snap b/packages/markdown-pdf/src/__snapshots__/PdfTransformer.test.js.snap index 2a2962b1..28266217 100644 --- a/packages/markdown-pdf/src/__snapshots__/PdfTransformer.test.js.snap +++ b/packages/markdown-pdf/src/__snapshots__/PdfTransformer.test.js.snap @@ -1030,9 +1030,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -1802,9 +1799,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, ], "xmlns": "Unknown", } @@ -2008,9 +2002,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -2477,9 +2468,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -2915,9 +2903,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -3069,9 +3054,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -3446,9 +3428,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -3879,9 +3858,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -4253,9 +4229,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -4640,9 +4613,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -5002,9 +4972,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -5369,9 +5336,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -5749,9 +5713,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -6150,9 +6111,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -6577,9 +6535,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -6970,9 +6925,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -7418,9 +7370,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -7816,9 +7765,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -8173,9 +8119,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -8565,9 +8508,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -8968,9 +8908,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -9393,9 +9330,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -9438,9 +9372,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -9800,9 +9731,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -9969,9 +9897,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -10450,9 +10375,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -10905,9 +10827,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -11363,9 +11282,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -11766,9 +11682,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -12175,9 +12088,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -12599,9 +12509,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -13063,9 +12970,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -13526,9 +13430,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -13977,9 +13878,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -14405,9 +14303,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -14860,9 +14755,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -15307,9 +15199,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -15718,9 +15607,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -16222,9 +16108,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -16667,9 +16550,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -17058,9 +16938,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -17547,9 +17424,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -18054,9 +17928,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -18585,9 +18456,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -19066,9 +18934,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -19557,9 +19422,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -20021,9 +19883,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -20461,9 +20320,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -20985,9 +20841,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -21445,9 +21298,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -21961,9 +21811,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -22413,9 +22260,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -22891,9 +22735,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -23361,9 +23202,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -23794,9 +23632,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -24238,9 +24073,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -24662,9 +24494,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -25131,9 +24960,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -25599,9 +25425,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -26087,9 +25910,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -26561,9 +26381,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -27037,9 +26854,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -27500,9 +27314,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -27945,9 +27756,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -28406,9 +28214,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -28834,9 +28639,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -29115,9 +28917,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -29244,9 +29043,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -29357,9 +29153,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -29544,9 +29337,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -30040,9 +29830,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -30273,9 +30060,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -30651,9 +30435,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -31088,9 +30869,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -31371,9 +31149,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -31766,9 +31541,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -32199,9 +31971,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -32482,9 +32251,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -32619,9 +32385,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -32731,9 +32494,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, ], "xmlns": "Unknown", } @@ -33769,9 +33529,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -34541,9 +34298,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, ], "xmlns": "Unknown", } @@ -34874,9 +34628,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -35212,9 +34963,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -35577,9 +35325,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, Object { "$class": "org.accordproject.commonmark.Paragraph", "nodes": Array [ @@ -35773,9 +35518,6 @@ Object { }, ], }, - Object { - "$class": "org.accordproject.commonmark.ThematicBreak", - }, ], "xmlns": "Unknown", }