Open GoogleCodeExporter opened 9 years ago
[deleted comment]
On 12 Dec 2014, at 11:49, Miguel Filgueiras <m…@t-online.de> wrote:
Hi,
Thanks for your answer. I should have noticed the selectorfunction
configuration, sorry. I include below a possible way of using it
for what I asked, in case you wish to add it to the documentation.
As to the issue you mention of embedded classes, I think this
can also happen in any case, even with only the hyphenator class.
Thanks again!
Miguel
---------------
Hyphenator.config({selectorfunction: function () {
var es=[],xs,l;
// iterate on each class to be hyphenated
['myhclass1', 'myhclass2'].forEach(function(c,i,a){
xs=document.getElementsByClassName(c);
l=xs.length;
for(i=0;i<l;i++) es.push(xs[i]);
});
return(es);
}});
----------------
Original comment by mathiasn...@gmail.com
on 7 Jan 2015 at 2:21
The issue that embedded classes get processed multiple times exists indeed.
Needs a fix!
Original comment by mathiasn...@gmail.com
on 7 Jan 2015 at 2:22
[deleted comment]
The issue with multiple classes is fixed in r1314:
Result of selectorfunction is 'flattened'
Next step: think about support for multiple classes:
Pro:
+ it's easier than writing a custom selectorfunction
Contra:
- needs more code (filesize!)
- could be solved with selectorfunction (-> provide an example)
- list of classes error prone: "class1, class2" != "class1 class2" (OR vs AND)
Original comment by mathiasn...@gmail.com
on 18 Jan 2015 at 11:14
Original issue reported on code.google.com by
mathiasn...@gmail.com
on 12 Dec 2014 at 12:00