Jump to content
nohl

Replace Utility - how to insert a line break?

Recommended Posts

I want to make a simple replacement to convert a multi-line block of text into a more html-friendly format.

 

example:

Have this...

  quick

  brown

  fox

Want this...

  quick<br/>

  brown<br/>

  fox

 

I've got a workflow Replace utility that looks like this:

image.thumb.png.e92ba1de9dc0ec9e743971ebaed335f7.png

 

My result is this...

  quick<br/>/nbrown<br/>/nfox

 

I'm guessing my escape character in the replace field is totally wrong.

 

Any suggestions?

Share this post


Link to post

IIRC, Alfred only supports escapes like \n and \t in the regex field, but not the replacement field. You have to paste a literal linebreak (tab character etc.) in there instead.

Edited by deanishe

Share this post


Link to post

I seem to recall this having been discussed/requested previously, but a quick search isn’t turning up the post. I don’t remember if it was a proper feature suggestion or a post in passing.

Share this post


Link to post
8 hours ago, vitor said:

I don’t remember if it was a proper feature suggestion or a post in passing.

 

It has come up a few times in connection with various workflow elements. This was the most recent one, I believe.

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...