bradyvercher / gistpress

WordPress plugin to add Gist oEmbed and shortcode support with caching.
GNU General Public License v2.0
143 stars 28 forks source link

Refactor process_gist_html() method #19

Closed GaryJones closed 1 year ago

GaryJones commented 11 years ago

The process_gist_html() method currently does too much.

It:

That is far too much responsibility for a single method, and should be split into several smaller protected methods that would be more easily testable and easier to read and maintain.

GaryJones commented 11 years ago

This gist processor may even be better being pulled out into a new class?

bradyvercher commented 11 years ago

Something to consider is how changes to the HTML structure will affect the way the plugin works. Right now it's reliant on the current markup, so if there's a way we can break the processor out and make it easy to update in the event the markup does change, that would be ideal. We may also want to modify the default class names to move away from the .pre- suffix.