The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How to add a semicolon before every 1st breakline in every paragraphs., Thank thank everyone.
S.mutans
post Sep 28 2016, 07:21 AM
Post #1





Group: Members
Posts: 7
Joined: 27-September 16
Member No.: 24,862



This is a dictionary text file.
Every paragraphs are enclosed by
<p class="calibre_11">paragraph1</p>.

I want to insert a semicolon
before every 1st breakline
in every paragraphs?

I want to ask about
1. the necessary tools and
2. the method
to make this change:

Find and replace all

CODE
<p class="calibre_11">
<span class="bold">
entry1
</span>
<br class="calibre1"/> // want to insert a semicolon before the 1st breakline
meaning1
<br class="calibre1"/> // other breaklines remain unchanged
meaning2
<br class="calibre1"/> // other breaklines remain unchanged
meaning3
</p>


to

CODE
<p class="calibre_11">
<span class="bold">
entry1
</span>
;<br class="calibre1"/> // inserted a semicolon before the 1st breakline  
meaning1
<br class="calibre1"/> // other breaklines remain unchanged
meaning2
<br class="calibre1"/> // other breaklines remain unchanged
meaning3
</p>


This post has been edited by S.mutans: Sep 28 2016, 07:41 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 28 2016, 07:46 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,049
Joined: 9-August 06
Member No.: 6



I take it this is hardcoded? Find & Replace. Every editor has it.

Find: "<br class="calibre1"/>"
Replace: ";<br class="calibre1"/>"
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 28 2016, 09:20 AM
Post #3


.
********

Group: WDG Moderators
Posts: 7,933
Joined: 10-August 06
Member No.: 7



If it's meant just for decoration, you might create the semicolon with CSS:

CODE
.calibre_11 .bold:after {content: ';'}

Note that this results in a space before the semicolon, this is due to the linebreaks in the HTML. I don't think CSS alone can remove the space.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 28 2016, 09:42 AM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,049
Joined: 9-August 06
Member No.: 6



QUOTE(pandy @ Sep 28 2016, 02:46 PM) *

I take it this is hardcoded? Find & Replace. Every editor has it.

Find: "<br class="calibre1"/>"
Replace: ";<br class="calibre1"/>"


Oh, sorry! I didn't notice some BR with that class shouldn't be touched.

Like this then.

Find: "</span>
<br class="calibre1"/>"
Replace: "</span>
;<br class="calibre1"/>"

Your editor may or may not use some kind of token for the line break.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
S.mutans
post Sep 28 2016, 08:49 PM
Post #5





Group: Members
Posts: 7
Joined: 27-September 16
Member No.: 24,862



Manager, please delete this thread.
I should restate my problem.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 29 2016, 11:54 AM
Post #6


.
********

Group: WDG Moderators
Posts: 7,933
Joined: 10-August 06
Member No.: 7



Usually we don't delete threads. You might keep posting in this thread, or simply start a new one if the restated problem is very different.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 15th November 2018 - 02:15 PM