04-05-2024, 05:46 PM | #1 |
Enthusiast
Posts: 46
Karma: 10
Join Date: Jul 2023
Device: none
|
How do you put a line break in a clip?
One of my most common edits is splitting a paragraph into two, so I so I made a clip:
</p> <p class="bodytext"> I prefer my paragraphs to start on a new line in the xhtml code. When I pasted the above clip into the clips editor, it replaced the line break with a space. When I put a \n into the clip editor, it pasted a literal \n into the code window. How do I get the <p to start on a new line in the xhtml code from a clip? |
04-05-2024, 05:59 PM | #2 |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not sure you can. I don't worry about any kind of line breaks or indenting when using clips, or even general regex find and replace. That's what Prettify is for.
|
04-05-2024, 06:49 PM | #3 |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You could try copying from something that has the line break and pasting it into the clips editor. Even if you can't see it, it might work.
|
04-05-2024, 07:52 PM | #4 |
Well trained by Cats
Posts: 30,377
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Pretty will beautify that code (blank line between)
|
04-06-2024, 01:54 AM | #5 |
just an egg
Posts: 1,655
Karma: 5432100
Join Date: Mar 2015
Device: Kindle, iOS
|
It does work (at least on Mac). This is what I've always done — copy my clip (with line breaks) and pasting in to the clips editor.
|
04-06-2024, 08:03 AM | #6 |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I kind of figured that would be the case. Thanks for confirming. I'll double-check on Windows and Linux when I get a chance, but I would expect the same behavior.
|
04-06-2024, 12:35 PM | #7 |
Bibliophagist
Posts: 39,500
Karma: 154108302
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
That works on Windows as well.
|
04-06-2024, 07:28 PM | #8 |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I think what the OP might be seeing is the different behaviors between an insert point and a range.
If you just click somewhere in the code window it creates an insert point. When you try to insert a clip with a \n then it inserts a literal '\n'. If you highlight a range in code view it will insert the actual line breaks. Not sure if that is a 'bug', but I've lived with it for years and thought it was intended behavior. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Line break for poetry | wisark | Calibre | 9 | 03-17-2023 09:45 AM |
S&R line break | Cubis | Conversion | 2 | 03-11-2014 08:02 PM |
Inexplicable line break | Gretsch | Conversion | 0 | 01-24-2014 02:49 AM |
Line break within Headers? | Lori Reeser | Sigil | 7 | 02-15-2013 07:27 PM |
how to insert break-line | schuster | Recipes | 1 | 05-24-2011 03:19 PM |