johno / ember-remarkable

Ember addon for Remarkable markdown parsing helpers and components.
MIT License
26 stars 20 forks source link

Feature: Exclude Highlight.js #31

Closed dennisschroer closed 7 years ago

dennisschroer commented 7 years ago

This PR allows to disable/exclude highlight.js using a configuration option in config/environment.js:

remarkable: {
   excludeHighlightJs: true
}

When HighlightJs is excluded, the component falls back to the default highlighting, and the dependency is no longer included in the vendor.js file. This fixes #30.

As an additional benefit, this PR allows to easily override the highlight(str, lang) function used by remarkable.

cmitz commented 7 years ago

Why do we want this? It reduces the initial page load with ±500 kb.

cmitz commented 7 years ago

@denniss17 don't forget to bump the version number. Probably to 3.5.0, but we can leave that to @johnotander 's wishes

dennisschroer commented 7 years ago

@johnotander Any comments?

dennisschroer commented 7 years ago

Still nothing?

johno commented 7 years ago

Hey @denniss17, my apologies for the delay in reviewing your PR. I've been bogged down with other work this month. Thank you for taking the time to add this functionality, it looks great.

johno commented 7 years ago

Published to npm as ember-remarkable@3.5.0.