DEV: already defined constant 'HIGHLIGHTJS_DIR'

This commit is contained in:
Régis Hanol 2019-01-21 10:12:23 +01:00 committed by GitHub
parent 27c421775e
commit d75510dd2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module HighlightJs
HIGHLIGHTJS_DIR = "#{Rails.root}/vendor/assets/javascripts/highlightjs/"
HIGHLIGHTJS_DIR ||= "#{Rails.root}/vendor/assets/javascripts/highlightjs/"
def self.languages
langs = Dir.glob(HIGHLIGHTJS_DIR + "languages/*.js").map do |path|