<commit_before>### clamp非webkit内核浏览器实现
***

解决方法一,只适合于英文文本,英文单次都使用空格间隔单词。

js

	var ellipsisText = function (e, etc) {
    	var wordArray = e.innerHTML.split(" ");
    	while (e.scrollHeight > e.offsetHeight) {
       	 	wordArray.pop();
       	 	e.innerHTML = wordArray.join(" ") + (etc || 			"...");
    	}
	};
	
html

	<div class="block-with-text"><commit_msg>clamp<commit_after>### clamp非webkit内核浏览器实现
***

解决方法一,只适合于英文文本,英文单次都使用空格间隔单词。

js

	var ellipsisText = function (e, etc) {
    	var wordArray = e.innerHTML.split(" ");
    	while (e.scrollHeight > e.offsetHeight) {
       	 	wordArray.pop();
       	 	e.innerHTML = wordArray.join(" ") + (etc || "...");
    	}
	};
	
html

	<div class="block-with-text">
{'fraction_non_alphanumeric': 0.17573221757322174, 'fraction_numerical': 0.0, 'mean_word_length': 2.860215053763441, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4238152', 'n_tokens_mistral': 323, 'n_tokens_neox': 325, 'n_words': 43}