Comments (3)
Hello,
thanks for your suggestion.
In my mind, the first paragraph is complete so the ...
belongs to the second paragraph. Can you explain me why you think the ellipsis in the first paragraph is better?
from html-truncator.
I don't think I thought this through properly. What I suggested above would actually be really wrong behaviour.
I think an ellipsis at the start of (and replacing) a paragraph isn't a common construct in writing, hence looking a little wrong to me when rendered. I'm happy for this to be closed. Thank you for the gem.
If I want to avoid having <p>...</p>
appearing occasionally (from an aesthetic perspective) I can just write a little wrapper that tries to avoid truncating at block boundaries giving:
<p>five words in this...</p>
from html-truncator.
OK :)
from html-truncator.
Related Issues (15)
- The ellipsis should not be put in code tags HOT 2
- Strips iframe tags on ruby 2.1 HOT 1
- Is there any way to ignore specified tags? HOT 2
- Strips script and style
- Not work with russian language HOT 5
- HTML encoded strings are decoded HOT 2
- Current implementation creates a Singleton class and prevents marshaling HOT 2
- Messing up Nokogiri HOT 1
- For speed, allow Nokogiri nodes to be passed in HOT 3
- Characters instead of Words HOT 4
- Pattern in words scan HOT 1
- Removing img tag HOT 3
- Comma after text HOT 2
- number of words vs number of chars HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-truncator.