<commit_before># Recipe Instant Articles

Enhances formatting of [EasyRecipe Plus](http://easyrecipeplugin.com/) content when publishing [Facebook Instant Articles](https://wordpress.org/plugins/fb-instant-articles/) from your WordPress site.

## Requirements

- [EasyRecipe Plus](http://easyrecipeplugin.com/)*
- [Instant Articles for WP](https://wordpress.org/plugins/fb-instant-articles/)

>\* This helper plugin only works with EasyRecipe Plus. The free version, EasyRecipe, is not supported.

## Setup

Install and activate the **Recipe Instant Articles** plugin, then add the custom transformer rules in the Instant Articles for WP settings.

### Custom Transformer Rules

You can use the list of custom transformations below to begin formatting your EasyRecipe Plus content.

Copy and paste the following rules into the **Custom Transformer Rules** settings in the Instant Articles for WP plugin.

```json
{ "rules": [
  { "class": "IgnoreRule", "selector": "div.ERSClear" },
  { "class": "IgnoreRule", "selector": "div.ERSSavePrint" },
  { "class": "IgnoreRule", "selector": "div.endeasyrecipe" }
  { "class": "PassThroughRule", "selector": "div.easyrecipe" },
  { "class": "PassThroughRule", "selector": "div.ERSDetails" },
  { "class": "PassThroughRule", "selector": "div.ERSTimes" },
  { "class": "PassThroughRule", "selector": "link" },
  { "class": "PassThroughRule", "selector": "div.ERSIngredients" },
  { "class": "PassThroughRule", "selector": "div.ERSInstructions" },
  { "class": "PassThroughRule", "selector": ".instructions" },
  { "class": "PassThroughRule", "selector": "div.ERSNutrition" },
  { "class": "H2Rule", "selector": "div.ERSIngredientsHeader" },
  { "class": "H2Rule", "selector": "div.ERSInstructionsHeader" },
  { "class": "H2Rule", "selector": "div.ERSName" },
  { "class": "H2Rule", "selector": "div.ERSNotesHeader" },
  { "class": "ParagraphRule", "selector": "div.ERSAuthor" },
  { "class": "ParagraphRule", "selector": "div.ERSHead" },
  { "class": "ParagraphRule", "selector": "div.ERSNotes" },
  { "class": "ParagraphRule", "selector": "div.ERSSectionHead" },
  { "class": "ItalicRule", "selector": "time" },
] }
```<commit_msg>Fix transformer rules example (#1)<commit_after># Recipe Instant Articles

Enhances formatting of [EasyRecipe Plus](http://easyrecipeplugin.com/) content when publishing [Facebook Instant Articles](https://wordpress.org/plugins/fb-instant-articles/) from your WordPress site.

## Requirements

- [EasyRecipe Plus](http://easyrecipeplugin.com/)*
- [Instant Articles for WP](https://wordpress.org/plugins/fb-instant-articles/)

>\* This helper plugin only works with EasyRecipe Plus. The free version, EasyRecipe, is not supported.

## Setup

Install and activate the **Recipe Instant Articles** plugin, then add the custom transformer rules in the Instant Articles for WP settings.

### Custom Transformer Rules

You can use the list of custom transformations below to begin formatting your EasyRecipe Plus content.

Copy and paste the following rules into the **Custom Transformer Rules** settings in the Instant Articles for WP plugin.

```json
{ "rules": [
  { "class": "IgnoreRule", "selector": "div.ERSClear" },
  { "class": "IgnoreRule", "selector": "div.ERSSavePrint" },
  { "class": "IgnoreRule", "selector": "div.endeasyrecipe" },
  { "class": "PassThroughRule", "selector": "div.easyrecipe" },
  { "class": "PassThroughRule", "selector": "div.ERSDetails" },
  { "class": "PassThroughRule", "selector": "div.ERSTimes" },
  { "class": "PassThroughRule", "selector": "link" },
  { "class": "PassThroughRule", "selector": "div.ERSIngredients" },
  { "class": "PassThroughRule", "selector": "div.ERSInstructions" },
  { "class": "PassThroughRule", "selector": ".instructions" },
  { "class": "PassThroughRule", "selector": "div.ERSNutrition" },
  { "class": "H2Rule", "selector": "div.ERSIngredientsHeader" },
  { "class": "H2Rule", "selector": "div.ERSInstructionsHeader" },
  { "class": "H2Rule", "selector": "div.ERSName" },
  { "class": "H2Rule", "selector": "div.ERSNotesHeader" },
  { "class": "ParagraphRule", "selector": "div.ERSAuthor" },
  { "class": "ParagraphRule", "selector": "div.ERSHead" },
  { "class": "ParagraphRule", "selector": "div.ERSNotes" },
  { "class": "ParagraphRule", "selector": "div.ERSSectionHead" },
  { "class": "ItalicRule", "selector": "time" }
] }
```
{'fraction_non_alphanumeric': 0.17854687141874856, 'fraction_numerical': 0.00206280082512033, 'mean_word_length': 5.484398216939079, 'pattern_counts': {'":': 82, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7600049', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1347, 'n_words': 370}