Commit Graph

10 Commits

Author SHA1 Message Date
Michael Demetriou 4feac6dcd2 Remove `langs` list from `post-render` as it does not actually
do anything useful (see https://github.com/writeas/writefreely/pull/128#issuecomment-506207107)
2019-06-27 18:15:58 +03:00
Michael Demetriou 0842119694 Change `sh` alias back to `bash`
because this is the alias in highlight itself.

(see https://github.com/writeas/writefreely/pull/128#issuecomment-505766645)
2019-06-27 00:12:18 +03:00
Michael Demetriou c2d7c2c8b7 Fix #124 according to the snippet by @mrvdb
I changed the sh alias to shell instead of bash.

The additions to the `highlight(nodes)` function look redundant.
It works for me without them but maybe they cover an edge case I
cannot think about?
2019-06-25 21:17:30 +03:00
Marcel van der Boom f40ce14fb2 Resolve an edge case where last language has error
If there are multiple language blocks on a page, we set the
onload on the last one to load all highlighting at once.

If the last language block has an error, the onload would
never fire and thus all blocks would not be highlighted.

The simplest resolution is to fire the callback regardless. We've
already loaded everything so running the callback is not causing any
performance hit which is relevant I think.
2019-03-05 14:36:40 +01:00
Matt Baer 9e466a6d23 Locally host MathJax
This closes T551
2018-12-07 16:50:29 -05:00
Matt Baer 860e8c0120 Locally host highlightjs
Part of T551
2018-12-07 16:37:14 -05:00
Matt Baer 5fc41687be Fix whitespace 2018-12-03 12:18:04 -05:00
Marcel van der Boom 3b4d14f194 Only push language uri once on load stack 2018-11-29 17:36:50 +01:00
Marcel van der Boom c6e4967728 Add support for all languages
- dynamically construct a list of languages to load
- fire hightlighting once last file has loaded
2018-11-29 16:25:53 +01:00
Matt Baer 2b5e869916 Rename render.tmpl to post-render.tmpl 2018-11-23 12:37:59 -05:00