Greasy Fork is available in English.

Linkify Plus Plus

Based on Linkify Plus. Turn plain text URLs into links.

< Σχολιασμός για τον κώδικα Linkify Plus Plus

Ερώτηση/σχόλιο

§
Δημοσιεύτηκε: 21/04/2015
Επεξεργάστηκε: 21/04/2015

WBR-tags of normal text are removed too

http://jsfiddle.net/ptfd7y2v/4/

I don't think that's appropriate.

And maybe removing them from the link-text isn't too good either.
Firefox is wrapping URLs in the link-text by default, but e.g. Chrome (and IE) don't.

eightΔημιουργός
§
Δημοσιεύτηκε: 21/04/2015

LPP will remove all <wbr> tags.

Related topic:
https://greasyfork.org/zh-TW/forum/discussion/1543/x

Though I had mentioned the use of word-wrap, it might break the page so I didn't add it.

An example to add word-wrap: break-word; on body:
http://jsfiddle.net/ptfd7y2v/5/

Maybe I can add word-wrap to those elements that have <wbr> children. But still, it might break the original layout.

§
Δημοσιεύτηκε: 26/04/2015

Why remove the at all?
Wouldn't it be better to only remove it from the string to test if it can be linkified or not, and then use that de--ified string as the , but not actually remove the from the content?

E.g. in the two jsfiddles, the LPP 3.6.3 adds the word-wrap to , which is way too invasive IMHO.

eightΔημιουργός
§
Δημοσιεύτηκε: 27/04/2015

Fixed in 4.0.0 :)

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.