Extra spaces and line break after inserting snippets

I am extracting information from google sheet and using these info as dropdown. However, when I select the options and execute it, it comes with extra spaces and extra line break.

  1. I have kept trim function but still extra spaces.

  2. While executing snippet. If you see, there is space between word and comma, which is not required.

  3. Output with extra space and line-break. Cursor is coming in next line.
    image

I am not really sure whether this is because of google sheet urlload command or I am not doing trim properly. @Cedric_Debono_Blaze Thanks

Sometimes this happens with Snippets my teams and I use in Salesforce Lightning. The solution I implemented was to put a {key:backspace} command to get rid of the line break. Sometimes we need to get a little creative and combine it with an arrow key command or 2 to get it to work how it must in a particular field. Salesforce is notorious for fields behaving differently despite them looking the same on the surface.

Hope this idea helps spark a solution for you!
-Brad

Thanks Brad, that's really creative thinking. I never had a thought like that.

Before your {endnote}, can you add this:

{current_options_trimmed = map(current_options, x -> trim(x))}

Basically, this trims each item in the list manually. Then use current_options_trimmed in your formmenu. Hopefully this will work.

Thank you Gaurang, that worked. One last thing, there is extra line-break before the sentence as well? how do I remove it? E.g. above Anxiety worsening....

Might be due to the snippet layout itself. Try putting the chips in the snippet consecutive to each other (next to each other on same line) or try putting trim=yes in some of them that are near the line break.

Thanks. That's what I thought and it worked. Thank you for all your help.

You are welcome, glad I was able to help :slight_smile:

This is really late, but I found that If I copy and paste what I want with ctrl + shift + v

It retains the formatting it had before without adding a space or extra lines.

Try fixing the issue with formatting in google sheet, and then copy pasting with shift into text blaze.

Extremely late to the party, but… in our corporate environment, we frequently use Text Blaze snippets outside of the web browser—specifically in our local email clients.
The issue, however, is that the shortcut-based snippet insertion function doesn’t work there.

As a workaround, we generate the required snippet using the "Preview" function; however, the "Trim" settings are completely ignored when doing so.

This line, which is correct according to the "Try it out" feature, is rendered in the preview with two line breaks before and after the drop-down menu:

… in unserem Webshop {formmenu: default=schwitzen.com; koerperpflege.com; uv-geraet.com; laulas.com; name=Webshops; trim=no} aufzugeben.

Whether or not to trim remains irrelevant, unfortunately.
Is there anything that can be done about this, or should I report it as a bug?

Hi @Sascha_Ballweg,

Thanks for reporting the issue!

Are you using our desktop apps (Windows or Mac) to insert the snippets outside of the browser?

I am using macOS Ventura 13.7.8 (22H730), which appears to be unsupported.
Consequently, I installed the Chrome app after being prompted to perform the installation via the browser.

In the Chrome app preview, I also get two unnecessary line breaks, whereas everything is correct when using the "Try it out" feature.
However, far too many clicks are required to be able to use "Try it out" effectively.

Any ideas?

Hi @Sascha_Ballweg,

Could you please share the snippet that is having this issue with me at ashwin@blaze.today?

You can do this by copying the snippet into a separate folder and sharing that folder with me.

Shared – you are now an editor. Please note that…

line break formatting is correct in the preview, but not when we copy the section and paste it elsewhere (e.g., into a plain text editor like Notepad++).

Hi @Sascha_Ballweg,

If I understand correctly, you are copying from Chrome and pasting into Notepad++? Are you on macOS or Windows?

I am using macOS Ventura 13.7.8 (22H730) and copy into the plain text editor BBEdit (which is only similar to notepad++)