sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::Context#optimize_svg_for_uri_escaping!
Optimizes an SVG for being URI-escaped. This method only performs these basic but crucial optimizations: * Replaces " with ', because ' does not need escaping. * Removes comments, meta, doctype, and newlines. * Collapses whitespace.
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/context.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--Context-optimize_svg_for_uri_escaping--for-pr
# Commit to gitgit add lib/sprockets/context.rbgit commit -m "better docs for Sprockets::Context#optimize_svg_for_uri_escaping!"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--Context-optimize_svg_for_uri_escaping--for-pr
hub pull-request
# Celebrate!