Skip to content

Commit

Permalink
Fix the spacing for the implicit line breaks in odt
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Feb 17, 2024
1 parent 29e3519 commit 713ab49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/odt/postprocess/mergeParagraphs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function mergeParagraphs(markdownChunks: MarkdownChunks, rewriteRules: Re
const findFirstTextAfterPos = (start: number): string | null => {
for (let pos = start + 1; pos < markdownChunks.chunks.length; pos++) {
const currentChunk = markdownChunks.chunks[pos];
if ('text' in currentChunk) {
if ('text' in currentChunk && currentChunk.text !== '') {
return currentChunk.text;
}
}
Expand All @@ -80,7 +80,7 @@ export function mergeParagraphs(markdownChunks: MarkdownChunks, rewriteRules: Re
isTag: false,
text: '\n',
mode: 'md',
comment: 'End of line, but next line is list'
comment: 'End of line, but next line is list' + nextText + ' ' + nextParaClosing
});
position--;
previousParaPosition = 0;
Expand Down
1 change: 0 additions & 1 deletion test/odt_md/Issues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('MarkDownTransformTest', () => {
});

it('test ./issue-434', async () => {
return; // Should we convert this fake list into real?
// https://github.com/mieweb/wikiGDrive/issues/434
const testMarkdown = fs.readFileSync(__dirname + '/issue-434.md').toString();
const markdown = await transformOdt('issue-434');
Expand Down
2 changes: 1 addition & 1 deletion test/odt_md/issue-434.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
**LOINC Code:** Logical Observation Identifiers Names and Codes (LOINC) are used primarily for results coming into the system, to match "apples to apples". Enterprise Health's Medical Codify may be used to search for or reference LOINC codes, as well as other online resources.
**Layout:** Some orders have specific Exam Order Layouts assigned to them so they display consistently when results are manually entered, typically in the Tests and procedures section of an encounter.
**Doc Type:** A specific document type can be assigned to an order code within this editor, so that when these orders are resulted, a separate document is created.
**Appt. Type:** An appointment type can be tied to order codes within this editor so that when an order is on the due list and needs scheduled for an appointment, the system automatically selects the correct appointment type, with the proper amount of time allocated.
**Appt. Type:** An appointment type can be tied to order codes within this editor so that when an order is on the due list and needs scheduled for an appointment, the system automatically selects the correct appointment type, with the proper amount of time allocated.

0 comments on commit 713ab49

Please sign in to comment.