gcanti/docs-ts

Horizontal scrolling in rendered code blocks

Open

#33 建立於 2021年3月9日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)TypeScript (18 fork)github user discovery
accepting PRsgood first issue

倉庫指標

Star
 (106 star)
PR 合併指標
 (PR 指標待抓取)

描述

Currently docs-ts uses prettier to format markdown before writing out the docs.

The used options are:

const prettierOptions: prettier.Options = {
  parser: 'markdown',
  semi: false,
  singleQuote: true,
  printWidth: 120
}

The code blocks in Jekyll seem to work without horizontal scrolling only if lines don't exceed a 80 characters limit.

Is this intended behavior?

If not, I'd suggest one of those options:

  • Configure Jekyll to use 120 characters as limit (don't know if this is possible)
  • Configure Prettier to use 80 character limit

Or, and this Is what I would suggest:

  • Don't format at all inside docs-ts and encourage the user to use prettier-plugin-jsdoc. This is a much better editing experience. You have more control about the format, plus in the end the actual source file has the same formatting as the docs.

What do you think?

貢獻者指南