Pasting multiline-comments does not auto format

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
owinsloe
Posts: 161
Last visit: Tue Mar 26, 2024 8:14 pm
Been upvoted: 1 time

Pasting multiline-comments does not auto format

Post by owinsloe »

Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.160
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.17763.0

Pasting multiline-comments does not format correctly with the "Automatically format on paste" setting on.

The <# tag will paste from the current cursor position then the following text left-aligns.

eg.

}
<#
Powershell Studio
is cool when not pasting
#>

if ($BinPath)
{
<#
Powershell Studio
is cool when not pasting
#>
if ((test-path $BinPath))
{
<#
Powershell Studio
is cool when not pasting
#>
User avatar
owinsloe
Posts: 161
Last visit: Tue Mar 26, 2024 8:14 pm
Been upvoted: 1 time

Re: Pasting multiline-comments does not auto format

Post by owinsloe »

That didnt work too well....see attached image...
Untitled.jpg
Untitled.jpg (41.27 KiB) Viewed 3776 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Pasting multiline-comments does not auto format

Post by davidc »

When it comes to multi-line comments, PowerShell Studio formatting does not modify the white space. So, if you paste at the end of a line, it will begin insertion at the point and leave it as is.
David
SAPIEN Technologies, Inc.
User avatar
owinsloe
Posts: 161
Last visit: Tue Mar 26, 2024 8:14 pm
Been upvoted: 1 time

Re: Pasting multiline-comments does not auto format

Post by owinsloe »

Hi David,
Thanks for responding. Yes, that is correct...but could it?

ie. If PSS sees the '<#' open tag then align all newlines below this point until '#>' is reached.

Would I need to raise a new feature suggestion or is there some underlying behavior that would prevent PSS performing this function?

Cheers
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Pasting multiline-comments does not auto format

Post by davidc »

Yes, I highly recommend posting any feature request you have here:

https://www.sapien.com/requests

Try to include the formatting the behavior you wish to see applied and we will see what we can do.
David
SAPIEN Technologies, Inc.
User avatar
owinsloe
Posts: 161
Last visit: Tue Mar 26, 2024 8:14 pm
Been upvoted: 1 time

Re: Pasting multiline-comments does not auto format

Post by owinsloe »

David, I posted a link for a NFS using the link you supplied but was a bit of a disaster. When I posted my pre-formatted text which looked fine, everything left aligned so the post doesnt make sense and I can not delete or edit.

I also tried to upload an image file but was getting an error (looked like permissions) and the upload would not work.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Pasting multiline-comments does not auto format

Post by davidc »

I will ask the web team to investigate the issues.

Thank you for posting the request.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Pasting multiline-comments does not auto format

Post by davidc »

They resolved the issue upload issue and you can now use a <pre> tag to preserve the formatting.
David
SAPIEN Technologies, Inc.
User avatar
J A Reif
Posts: 241
Last visit: Fri Mar 22, 2024 8:12 am
Answers: 1
Has voted: 1 time
Been upvoted: 1 time

Re: Pasting multiline-comments does not auto format

Post by J A Reif »

For best results using the <pre> tag, enter an empty paragraph first, change it to PRE using the Formats->Blocks drop-down and then paste your pre-formatted text.
June Alane Reif
SAPIEN Technologies, Inc.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.