diff --git a/CHANGELOG.md b/CHANGELOG.md index ab92415..05dab43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * Ignore formatting requests for files without matching file extensions (pas, dpr, dpk, inc). +* Fix error logging when cursor metadata is not parsed correctly. ### Changed diff --git a/Pasfmt.FormatCore.pas b/Pasfmt.FormatCore.pas index ae119ae..8e4214f 100644 --- a/Pasfmt.FormatCore.pas +++ b/Pasfmt.FormatCore.pas @@ -39,6 +39,7 @@ function ExtractCursorTag(Data: string; out TagValue: string): string; StartPos: Integer; EndPos: Integer; begin + Result := Data; TagPos := System.Pos(CTag, Data); if TagPos > 0 then begin StartPos := TagPos + Length(CTag);