We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
smithy format
Before running smithy format:
@pattern( """ (^\ ((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\\.(?!$)|$)){4}\ $)\ |\ (^\ (\ ([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}\ |([0-9a-fA-F]{1,4}:){1,7}:\ |([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}\ |([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}\ |([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}\ |([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}\ |([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}\ |[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})\ |:((:[0-9a-fA-F]{1,4}){1,7}|:)\ |fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}\ |::(ffff(:0{1,4}){0,1}:){0,1}\ ((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}\ (25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\ |([0-9a-fA-F]{1,4}:){1,4}\ :((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}\ (25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\ )\ $) """ ) string Ipv4Orv6
After running smithy format, it gets collapsed into:
@pattern( """ (^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$) """ ) string Ipv4Orv6
The formatter should preserve intentional newlines inside the text block, as they are part of the intended structure.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example
Before running
smithy format
:After running
smithy format
, it gets collapsed into:Expected behavior
The formatter should preserve intentional newlines inside the text block, as they are part of the intended structure.
References
The text was updated successfully, but these errors were encountered: