-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Multiple newlines added between empty textarea and "unformatted" inline elements #1534
Comments
@AmandaFoster
This is an issue because editors that provide Implementation note: |
The particular use-case I ran into was with I see what you mean now about the I think a warning would make sense if an element in one list would be overridden by its presence in another, especially if it would be removed internally. The last option might be drastic, but it may be more likely to catch your attention than a logged warning or trying to figure out why the code formatted a certain way. |
@AmandaFoster Thanks, I went ahead and fixed this bug without doing filtering. An element can be in all three lists without unexpected side effect now. Note: in the default settings, all elements that were Thanks again for reporting this issue! |
Will do. Thanks for the quick turn around. |
Description
If an inline tag is included in the
unformatted
settings, newlines are added between empty tags.textarea
elements are affected by this regardless of presence in theunformatted
array. The newlines double each time as well.As a work-around, if there is text, comments, or no space between the tags, this does not happen.
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Example without
unformatted
section in settings:Example with
unformatted
section in settings:Steps to Reproduce
Tested on JS Beautify site
Environment
OS: windows
Settings
Example without
unformatted
:Example with
unformatted
:The text was updated successfully, but these errors were encountered: