Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide max line-length in comment filter. #454

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Nov 8, 2024

Does not text wrapping functionality yet, just proves non-breaking for existing usage.

Remaining TODOs:

  • Don't split markdown links (e.g. [a]: really-long-url)
  • Indent split markdown lists (e.g. - really long amount of text)
  • Address Go's different formatting for numbered lists vs. unordered lists

Fixes #364

@jsuereth
Copy link
Contributor Author

Frustratingly, I'm running into an oddity in go fmt that I'm not sure we should make the default for weaver or somehow configure.

Specifically the go fmt comment spec states the following about lists:

Gofmt reformats bullet lists to use a dash as the bullet marker, two spaces of indentation before the dash, and four spaces of indentation for continuation lines.

Gofmt reformats numbered lists to use a single space before the number, a period after the number, and again four spaces of indentation for continuation lines.

I'm not positive why there's a single-space before number lists and two spaces before dash lists, but we do NOT do this in weaver today.

@lquerel Thoughts? Should I create a specific renderer for markdown for Go that abides by these restrictions?

Additionally, go fmt does not allow nested lists.

@MrAlias What should we do if we have a nested list? Will Go (and go fmt) ignore this or fail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to word-wrap or limit line length
1 participant