diff --git a/pages/parser/index.md b/pages/parser/index.md index 090519a..fff9ec8 100644 --- a/pages/parser/index.md +++ b/pages/parser/index.md @@ -20,7 +20,7 @@ you should know what your receiving on what port so getting the proper string ei ## Table of Contents 1. [Introduction](#introduction) -2. [basic Usage](#basic-usage) +2. [Basic Usage](#basic-usage) ## Basic Usage diff --git a/src/utils/normalizedBuilder.ts b/src/utils/normalizedBuilder.ts index 2c8cf27..1333d58 100644 --- a/src/utils/normalizedBuilder.ts +++ b/src/utils/normalizedBuilder.ts @@ -146,8 +146,8 @@ export function normalizedClientMessageBuilderOptions (raw?: ClientBuilderMessag export function normalizedClientBatchBuilderOptions (raw?: ClientBuilderOptions): ClientBuilderOptions { const props: ClientBuilderOptions = { ...DEFAULT_CLIENT_BUILDER_OPTS, ...raw } - if (typeof props.text !== 'undefined' && props.text !== '' && props.text.slice(0, 3) !== 'BHS') { - throw new Error('text must begin with the BHS segment.') + if (typeof props.text !== 'undefined' && props.text !== '' && props.text.slice(0, 3) !== 'BHS' && props.text.slice(0, 3) !== 'MSH') { + throw new Error('text must begin with the BHS or MSH segment.') } if ((typeof props.newLine !== 'undefined' && props.newLine === '\\r') || props.newLine === '\\n') {