docbrown/app/assets
Dmitry Maksyoma f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* 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>
2020-05-15 14:27:46 +02:00
..
config Implement KatexTag (#6237) [deploy] 2020-03-09 17:58:54 -04:00
fonts feat: add per-user Open Dyslexic font setting (#5037) [deploy] 2020-01-20 18:23:57 -05:00
images [deploy] Home Page Feed redesign + top comments (#7579) 2020-05-12 07:57:57 -05:00
javascripts Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
stylesheets Fix the height of new post text area and add scrollbar (#7480) 2020-05-14 12:10:37 +02:00