function decimal_to_fraction_callback in Recipe 7.2
Same name and namespace in other branches
- 6 plugins/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 modules/
recipe_plaintext.module - Parsing instance for plain text recipes
File
- modules/
recipe_plaintext.module, line 291
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;
}