runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
500 stars 61 forks source link

Line breaks in markdown disrupting table format #255

Closed calebfoss closed 1 year ago

calebfoss commented 1 year ago

When an attribute, method, or parameter has a multiline description and the analysis is output as markdown, both a new line and <br /> tag are inserted, which disrupts the table format (see example below).

When I used the analyzer on 12/19/22, it only inserted <br /> tags without the new line and therefore maintained the table format. I'm having trouble figuring out what caused the change, since it looks like the tool hasn't been modified since then.

Example code:

class Test extends HTMLElement {
  constructor() {
    super();
  }
  /**
   * This is a multiline
   * description
   */
  methodA() {}
  /**
   * This is another
   * multiline description
   */
  methodB() {}
}
customElements.define("test-test", Test);

Example markdown:

test-test

Methods

Method Type Description
methodA (): void This is a multiline

description
methodB (): void This is another

multiline description
calebfoss commented 1 year ago

This issue was caused by using Windows line endings. I switched from CRLF to LF, and the newly generated markdown file no longer contained the extra line breaks.