Skip to content

Medtator saves CRLF as LF causing incorrect tag placement #18

Description

@andrewprivate

Because Medtator saves files in the XML format, which automatically converts CRLF (\r\n) into LF (\n), tags created when importing from a .txt file with CRLF will be offset into incorrect positions after saving the annotations and reloading the XML file.

Example:
test.txt

hello\r\nworld!\r\nfoobar

ann.text: 'hello\r\nworld!\r\nfoobar'

Image

The resulting XML save file:

<?xml version="1.0" encoding="UTF-8" ?>
<TEST>
<TEXT><![CDATA[hello
world!
foobar]]></TEXT>
<TAGS>
<Other spans="7~13" text="world!" id="O0" certainty="confirmed" frequency="" severity="" status="present" experiencer="patient" exclusion="no" comment=""/>
</TAGS>
<META/>
</TEST>

Now reloading the save from the XML file:
ann.text: 'hello\nworld!\nfoobar'

Image

Tag is in the incorrect position.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions