<commit_before>jQuery Text Highlight
=====================

jQuery Text Highlight is a plugin for highlighting Words, Text or Regular
Expressions within the DOM.

_Feature requests are welcome._

Usage Examples
--------------

Given the following html:

```html
<h1>Hello World</h1>
```

```javascript
$('h1').textHighlight('Hello');
$('h1').textHighlight(/World/);
$('h1').textHighlight([/Hello/, 'World']);
$('h1').textHighlight(['Hello', 'World'], {
  element: 'mark',
  class: '',
  caseSensitive: false
});
$('h1').removeHighlight();
```

Each line will produce the corresponding markup:

```html
<h1><mark>Hello</mark> World</h1>
<h1>Hello <mark>World</mark></h1>
<h1><mark>Hello</mark> <mark>World</mark></h1>
<h1><mark>Hello</mark> <mark>World</mark></h1>
```

Methods
-------

```javascript
$.fn.textHighlight( term, options )
```

Encapsulates text within a specified element.

* `term` could be either a string, a regular expression or an array of both.
* `options` is an object containing configuration options. See below for more details.

```javascript
$.fn.removeHighlight();
```

Removes the encapsulation applied by `$.fn.textHighlight`.

Options
-------

|Option         | Type       | Description |
| ------------- |----------- | ----------- |
| element       | `object`   | The tag name in which the matched text should be encapsulated.|
| class         | `string`   | A specific class to be added to that element. |<commit_msg>Improved example output formatting.<commit_after>jQuery Text Highlight
=====================

jQuery Text Highlight is a plugin for highlighting Words, Text or Regular
Expressions within the DOM.

_Feature requests are welcome._

Usage Examples
--------------

Given the following html:

```html
<h1>Hello World</h1>
```

```javascript
$('h1').textHighlight('Hello');
$('h1').textHighlight(/World/);
$('h1').textHighlight([/Hello/, 'World']);
$('h1').textHighlight(['Hello', 'World'], {
  element: 'mark',
  class: '',
  caseSensitive: false
});
$('h1').removeHighlight();
```

Each line will produce the corresponding markup:

```html
<h1>
  <mark>Hello</mark>
  World
</h1>
<h1>
  Hello
  <mark>World</mark>
</h1>
<h1>
  <mark>Hello</mark>
  <mark>World</mark>
</h1>
<h1>
  <mark>Hello</mark>
  <mark>World</mark>
</h1>
```

Methods
-------

```javascript
$.fn.textHighlight( term, options )
```

Encapsulates text within a specified element.

* `term` could be either a string, a regular expression or an array of both.
* `options` is an object containing configuration options. See below for more details.

```javascript
$.fn.removeHighlight();
```

Removes the encapsulation applied by `$.fn.textHighlight`.

Options
-------

|Option         | Type       | Description |
| ------------- |----------- | ----------- |
| element       | `object`   | The tag name in which the matched text should be encapsulated.|
| class         | `string`   | A specific class to be added to that element. |
{'fraction_non_alphanumeric': 0.2063222297756628, 'fraction_numerical': 0.010197144799456152, 'mean_word_length': 3.4523449319213313, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6041107', 'n_tokens_mistral': 933, 'n_tokens_neox': 874, 'n_words': 279}