* Fix Runkit tags not being activated when comment is added * Runkit tag activation was ran once, on page load. I've changed it to run on on comment preview and submit. * It was necessary to add a check to skip already activated Runkit tags. The code didn't take into account that a tag could be already processed, and would just crash. * Fix Runkit tags and add tests * Add test for previewing article with Runkit tag * "Fix CodeClimate not finding waitForRunkitAndActivateTags() * Refactor a test for readability * Make Rubocop happy * Improve test for previewing article with Runkit tag * Use one method for determining active Runkit tags * Defer loading of JS from embed.runkit.com * Add utility function dynamicallyLoadScript(url) * Switch to dynamic loading of Runkit * parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads. * Fix Runkit test * Remove Runkit script caching in v2 form * Use <%== instead of .html_safe in v2 form * Update app/assets/javascripts/utilities/dynamicallyLoadScript.js Co-authored-by: Nick Taylor <nick@iamdeveloper.com> Co-authored-by: Nick Taylor <nick@iamdeveloper.com> |
||
|---|---|---|
| .. | ||
| initializers | ||
| lib | ||
| utilities | ||
| .eslintrc.js | ||
| application.js | ||
| base.js.erb | ||
| hello-dev.js | ||
| initializePage.js.erb | ||
| internal.js | ||
| jquery_s3_upload.js | ||
| serviceworker-companion.js | ||