Skip to content
Merged
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
4 changes: 3 additions & 1 deletion lib/models/LineConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ function combineText (textItems) {
if (!text.endsWith(' ') && !textToAdd.startsWith(' ')) {
if (lastItem) {
const xDistance = textItem.x - lastItem.x - lastItem.width
if (xDistance > 5) {
if (xDistance > 15) {
text += ' '
} else if (xDistance > 5) {
text += ' '
}
} else {
Expand Down
9 changes: 8 additions & 1 deletion lib/models/transformations/ToMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ module.exports = class ToMarkdown extends Transformation {
}

// Concatenate words that were previously broken up by newline
// (handled below per block type)

// Ensure each bullet point starts on its own line
concatText = concatText.replace(/ • /g, '\n• ')

// Concatenate words that were previously broken up by newline
// Only remove hyphens at line breaks (word continuation), not in content
if (block.category !== 'LIST') {
concatText = concatText.split('- ').join('')
concatText = concatText.replace(/(\w)- \n(\w)/g, '$1$2')
}

// Assume there are no code blocks in our documents
Expand Down
Loading