function decimal_to_fraction_callback in Recipe 6
Same name and namespace in other branches
- 7.2 modules/recipe_plaintext.module \decimal_to_fraction_callback()
- 7 includes/recipe_plaintext.module \decimal_to_fraction_callback()
1 string reference to 'decimal_to_fraction_callback'
- recipe_plaintext_import in plugins/
recipe_plaintext.module - Parsing instance for plain text recipes
File
- plugins/
recipe_plaintext.module, line 223
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;
}