python-hl7
python-hl7 copied to clipboard
Backslash is swallowed when unescaping sequence like `\E\R\`
See this example piece of code:
msg = hl7.Message(separator="\r", sequence=[["MSH", "^~\\&"]])
unescaped = msg.unescape("\\E\\R\\")
unescaped should be \R\ because:
- the first
\E\becomes a literal\ - we're left with
R\
The library, however, returns \R, as if the trailing slash could be skipped.