185
// Handle links enclosed in parens, square brackets and curlys.
186
if (linkBeginIndex > 0) {
187
>
const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);
linkComputer.ts
188
>
const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);
189
>
190
>
if (
191
>
(charCodeBeforeLink === CharCode.OpenParen && lastCharCodeInLink === CharCode.CloseParen)
192
|| (charCodeBeforeLink === CharCode.OpenSquareBracket && lastCharCodeInLink === CharCode.CloseSquareBracket)
193
|| (charCodeBeforeLink === CharCode.OpenCurlyBrace && lastCharCodeInLink === CharCode.CloseCurlyBrace)
195
// Do not end in ) if ( is before the link start
196
// Do not end in ] if [ is before the link start