Web Analytics Made Easy -
StatCounter How to insert a semicolon before every 1st <br>eakline in every <p>aragraphs. - CodingForum

Announcement

Collapse
No announcement yet.

How to insert a semicolon before every 1st <br>eakline in every <p>aragraphs.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to insert a semicolon before every 1st <br>eakline in every <p>aragraphs.

    Thank thank everyone


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

    I want to add 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>

  • #2
    Semicolons Separate Clauses. Here's an example: I have a big test tomorrow; I can't go out tonight. The two clauses in that sentence are separated by a semicolon and could be sentences on their own.

    Comment


    • #3
      I’m not feeling like downloading a 60MB file right now but the code you posted looks like you have a definition and some descriptions. Therefore the underlying HTML is wrong in the first place; it should be a definition list:

      Code:
      <dl>
        <dt>Definition title</dt>
        <dd>Definition description</dd>
        <dd>Definition description</dd>
        <dd>Definition description</dd>
        <dt>Definition title</dt>
        <dd>Definition description</dd>
        <dd>Definition description</dd>
        …
      </dl>
      Then you could use CSS to add a semicolon if that’s appropriate or desired.
      Stop solving problems you don’t yet have!

      Comment


      • #4
        It definitely should be a definition list - there should not be any <br> tags
        Stephen
        Learn Modern JavaScript - http://javascriptexample.net/
        Helping others to solve their computer problem at http://www.felgall.com/

        Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

        Comment

        Working...
        X