239: Malformed file token

You started a block or list item with a left square bracket [, followed by a letter or digit, followed by either a hyphen - or colon :. This pattern is recognized as the start of a file token, but a right square bracket ] to mark the end of the file token is missing in your case.

Solution

Make sure you end the file token with a right square bracket ] as in the following example that links to an image:

[i:A dog sits next to a cat.]->friends.jpg

Mind that there can be no empty line inside the file token.

If you did not mean to start a file token and just wanted to print a left square bracket verbatim, you can add a backslash before it like this: \[