octref/polacode

JSDoc comments get messed up

AustinGil opened this issue · 2 comments

I love this extension. Thank you so much for making it.

One issue I've noticed is that for JavaScript code, sometimes the JSDoc blocks get messed up when generating the image.

My code example is this, but something about the curly braces in the comments is off and they get shifted.

/**
 * @param {string | number | Date} date
 * @param {Intl.DateTimeFormatOptions} [options]
 * @param {string | string[]} [locales]
 * @returns {string}
 */
function formatDate(date, options, locales) {
  date = new Date(date);
  options = options || { day: 'numeric', month: 'short', year: 'numeric' };
  locales = locales || navigator.language;

  return new Intl.DateTimeFormat(locales, options).format(date);
}

i had that problem too.i tried few things and somehow it worked.I hope this will help you.
issue- #149

Thanks @MasterBrian99. I wonder what causes the issue.