Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/line_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ class LineWrapper extends EventEmitter {
emitLine();
}

// Add a line break in the continued section
if (options.continued === true && options.lineBreakAfter === true) {
buffer = ""
wc = 0;
textWidth = 0;
emitLine();
}

this.emit('sectionEnd', options, this);

// if the wrap is set to be continued, save the X position
Expand Down
3 changes: 2 additions & 1 deletion lib/mixins/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ export default {
if (this._textOptions) {
for (let key in this._textOptions) {
const val = this._textOptions[key];
if (key !== 'continued') {
// We don't carry over these options
if (key !== 'continued' && key !== 'lineBreakAfter') {
if (result[key] === undefined) {
result[key] = val;
}
Expand Down