Hello Text Blaze Community,
I'm experiencing an issue with the macOS version of Text Blaze where I cannot get the replaceregex function to work properly with clipboard content. I've tried several approaches to replace single line breaks with double line breaks in text copied from websites.
Here are the patterns I've tried without success:
{=replaceregex({clipboard}, "\n", "\n\n", "sg")}
{=replaceregex({clipboard}, "(?:\r\n|\r|\n)", "\n\n", "sg")}
{=replaceregex({clipboard}, "[\r\n]+", "\n\n", "sg")}
{=replaceregex({clipboard}, "(?<!\n)\n(?!\n)", "\n\n", "sg")}
Even a simple test like {=replaceregex({clipboard}, "a", "A", "g")} doesn't work, which suggests there might be a fundamental issue with how the regex function processes clipboard content in the macOS app.
Has anyone else experienced this issue with the latest macOS version? Any workarounds or solutions would be greatly appreciated!
Thanks in advance for your help.
Hi @Blazingfast,
Thanks for reporting the issue.
Do you have any kind of formatting present in your snippet? Is the issue only happening in the Mac app and not in the Chrome extension for the same snippet?
1 Like
Hi @Ashwin_MittalTB .
Thanks for your help!
I copied the command to a new snippet and to the replacement for "a" to "A" works.
However I cannot single line breaks with double line breaks:
I tried three versions to copy over my text:
Heres the result when i copy the text from my post above:
{=replaceregex({clipboard}, "\n", "\n\n", "sg")}
there might be a fundamental issue with how the regex function processes clipboard content in the macOS app. Has anyone else experienced this issue with the latest macOS version? Any workarounds or solutions would be greatly appreciated! Thanks in advance for your help.
{clipboard}
there might be a fundamental issue with how the regex function processes clipboard content in the macOS app.
Has anyone else experienced this issue with the latest macOS version? Any workarounds or solutions would be greatly appreciated!
Thanks in advance for your help.
{={clipboard}}
there might be a fundamental issue with how the regex function processes clipboard content in the macOS app. Has anyone else experienced this issue with the latest macOS version? Any workarounds or solutions would be greatly appreciated! Thanks in advance for your help.
Is there any way to convert those single line breaks to double line breaks while removing the other formatting (like font, colour, background colour and so on..)?
Heres what I would like the output to look like:
there might be a fundamental issue with how the regex function processes clipboard content in the macOS app.
Has anyone else experienced this issue with the latest macOS version? Any workarounds or solutions would be greatly appreciated!
Thanks in advance for your help.
It looks like pasting the text without any formatting removes newline characters as well, so they cannot be replaced?
So how can i remove formatting and still keep new lines at all?
I dont want to insert coloured test from a website to my snippet so i need to use {=
Hi @Blazingfast,
Thanks for your response. Unfortunately, I cannot reproduce the issue where {={clipboard}}
removes newlines from the copied text. If you could provide a video demonstrating the issue, it would be very helpful.
Hi Ashwin,
thanks for your help, you are right!!
I tried to paste the clip here in the forum text window and it works - even replacing line breaks.
For some reason it I cannot replace newline characters when I paste the text to apple mail for macOS.
Now suddenly replacing "a" with "A" DOES work even in apple mail but not the line breaks.
Do you know why it does not replace line breaks?
Or alternatively is there a way to remove or replace text font and text color settings from clipboard test but set the line spacing after new lines to 1.5 or 1.0 width?
I tried inserting text to msword for macOS and apple notes as well and I found out: It always inserts a space instead of a new line - in apple mail as well. So instead of two newline characters I am getting two space after the text and then a single newline character. do you know why? Only in the browser window here it replaces the new lines with double new lines as intended.
Hi @Blazingfast,
Thanks for the detailed explanation. We are able to reproduce this issue where newlines are being replaced with spaces. We are working on fixing it, and I will update you when the fix is live in production.
1 Like
thanks @Ashwin_MittalTB! You are great!!!!
1 Like
Hi @Blazingfast,
Thanks for your patience. The issue has been resolved and is now live in production. Please quit and restart your desktop app to have the latest changes.