• The plugin stopped working. set_files was returning empty so $this->content[ $i ] was an undefined index. I believe the problem is in set_content. The gist-file div regex is written expecting it to close with no additional attributes after the class attribute:
    $regex = ‘/<div class=\”gist-file\”>.+?(?=<div class=\”gist-file\”>|<\/div>\n\’)/ms’;

    However there are now attributes in the gist HTML, after the class attribute – specifically the translate attribute:
    <div class=”gist-file” translate=”no”>

    I changed class-gistimporter.php by removing the closing > and now things seem to work. I think this is “good enough”, although it could be made more accurate to expect any char up to the >, but i’m not sure there is a need.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘gist html change breaks set_content’ is closed to new replies.