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

Inconsistent list item text indentation + printWidth ignored #79

Closed
RunDevelopment opened this issue Feb 12, 2021 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@RunDevelopment
Copy link
Contributor

The text of list items can be multiple paragraphs. These paragraphs are not indented with the same number of spaces.

Example

Before:

/**
 * Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus.
 *
 * 1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.
 * 2. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
 *
 *    Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
 *
 * @public
 */

After:

/**
 * Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla
 * mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget
 * bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero.
 * Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut,
 * mollis sed, nonummy id, metus.
 *
 * 1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo
 *    ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis
 *    parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec,
 *    pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.
 * 2. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In
 *    enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum
 *    felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus
 *    elementum semper nisi. Aenean vulputate eleifend tellus.
 *
 *     Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam
 * lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra
 * nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam
 * ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
 *
 * @public
 */

Bugs:

  1. The first line of the second paragraph of the second item is indented with one space more than the first paragraph.
  2. All wrapped lines of the second paragraph are not indented at all.
  3. There are several lines in the output that are longer than 80 characters. They are not the last lines of paragraphs. It seems that word wrapping does not account for the indentation of list items.
@hosseinmd hosseinmd added the bug Something isn't working label Feb 12, 2021
@hosseinmd

This comment has been minimized.

@hosseinmd hosseinmd added feature and removed bug Something isn't working labels Feb 12, 2021
hosseinmd added a commit that referenced this issue Feb 12, 2021
@RunDevelopment
Copy link
Contributor Author

Wrong issue. You probably meant to comment on #80.

@hosseinmd hosseinmd added bug Something isn't working and removed feature labels Feb 12, 2021
@hosseinmd
Copy link
Owner

Fixed in #96

hosseinmd added a commit that referenced this issue Mar 26, 2021
hosseinmd added a commit that referenced this issue Mar 29, 2021
* feat: refactor description formater

* fix: descriptions starting with code

* fix: indention in second paragraph

issue: #79

* v0.3.14-rc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants