You are here

function decimal_to_fraction_callback in Recipe 7

Same name and namespace in other branches
  1. 6 plugins/recipe_plaintext.module \decimal_to_fraction_callback()
  2. 7.2 modules/recipe_plaintext.module \decimal_to_fraction_callback()
1 string reference to 'decimal_to_fraction_callback'
recipe_plaintext_import in includes/recipe_plaintext.module
Parsing instance for plain text recipes

File

includes/recipe_plaintext.module, line 271

Code

function decimal_to_fraction_callback($matches) {
  $fraction_str = recipe_ingredient_quantity_from_decimal($matches[1], TRUE);

  // Don't want the frasl hassle.
  $fraction_str = preg_replace('/\\⁄/', '/', $fraction_str);
  return $fraction_str;
}