Topics

Adding an HTML space after a period (.)


WV- Mike
 

Greetings,
I want to add a space ( ) after every period in a sentence in  web page which has links, etc.
Search and replace is not a solution for obvious reasons.

Any ideas on a clip which would add    only after periods in a sentence?

Thanks,
WV-Mike

-- Mike Breiding www.EpicRoadTrips.us


Marcelo Bastos
 

On 15/08/2020 13:38, WV- Mike wrote:
Greetings,
I want to add a space ( ) after every period in a sentence in 
web page which has links, etc.
Search and replace is not a solution for obvious reasons.

Any ideas on a clip which would add    only after periods in a
sentence?
Wait, are you trying to add a single space after every period because
some of them were left mistakenly with *no* spaces after the period, or
are you trying to add a second space to separate sentences (which needs
to be a   because browsers ignore extra regular spaces, displaying
a single one)?

Because those are different problems:

- in the first case, you don't need a  , a regular space (" ") is
not only simpler, but it's the recommended option too, since it will
allow reflow to break between sentences. The problem of identifying the
periods which are in sentences as opposed to periods in URLs remains,
though.

- the second case, however, it's MUCH easier: just search for
period+space (". ") and replace with period+ +space (".  ").
Note that I recommend placing the non-breaking space *before* the
regular space, because that way when the line breaks the non-breaking
space will get attached to the end of the first line (where it is
essentially invisible) instead of the beginning of the second line
(where it would disrupt the left alignment)


--
MCBastos

This message has been protected with the 2ROT13 algorithm. Unauthorized use will be prosecuted under the DMCA.


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


WV- Mike
 

On 8/15/2020 2:13 PM, Marcelo Bastos wrote:
On 15/08/2020 13:38, WV- Mike wrote:
Greetings, I want to add a space ( ) after every period in a sentence in web page which has links, etc. Search and replace is not a solution for obvious reasons. Any ideas on a clip which would add    only after periods in a sentence?
Wait, are you trying to add a single space after every period because some of them were left mistakenly with *no* spaces after the period, or are you trying to add a second space to separate sentences (which needs to be a   because browsers ignore extra regular spaces, displaying a single one)?
Add a second space. I am using italics for parts of the page and for some reason the space between sentences in the italics looks very tight.
I used you method below:

period+space (". ") and replace with period+ +space (".  "). And that worked fine. I should have seen that solution to begin with, Thanks, Marcelo. WV-Mike

Because those are different problems: - in the first case, you don't need a  , a regular space (" ") is not only simpler, but it's the recommended option too, since it will allow reflow to break between sentences. The problem of identifying the periods which are in sentences as opposed to periods in URLs remains, though. - the second case, however, it's MUCH easier: just search for period+space (". ") and replace with period+ +space (".  "). Note that I recommend placing the non-breaking space *before* the regular space, because that way when the line breaks the non-breaking space will get attached to the end of the first line (where it is essentially invisible) instead of the beginning of the second line (where it would disrupt the left alignment)
-- Mike Breiding www.EpicRoadTrips.us