goldmark icon indicating copy to clipboard operation
goldmark copied to clipboard

add comments about errors

Open zakirullin opened this issue 1 year ago • 1 comments

Hi, thanks for your valuable work!

I've spent some time guessing why Convert method returns errors. My first guess was that the parser returns an error whenever it's unable to parse the input (which is strange). It turned out that the only possible cases for errors are:

  1. Provided Writer implementation returns an error
  2. User-custom html renderers returns an error

So, in the default scenario there won't be any errors.

I've just highlighted these cases in the comments, so that future developers wouldn't have to spend time for guesswork.

zakirullin avatar Jun 18 '23 08:06 zakirullin