-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Edit: (Related: solidity-parser/parser#32 this is required to allow hex literals to have the same formatting)
I have a 148 character long string that is hard to look at in the source code. So I've split it using multi-line and prettier-ignore
Similar to JavaScript prettier, if I write a string as 'abc' + 'def' than it tends to format things nicer than when I keep everything as one long string, the format process feels free to play around with my "chunks" and their position to make the "prettiest" format.
Currently split strings get joined.
Example:
string memory a = 'abc'
'def'
'ghi';Current Result:
string memory a = 'abcdefghi';Suggestion:
string memory a = 'abc'
'def'
'ghi';Or maybe have them be same line unless going over a certain length:
// assume including the ghi chunk would put it over the one line length limit.
string memory a = 'abcdef'
'ghi';
// OR
string memory a = 'abc' 'def'
'ghi';k06a
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request