كيفية تفعيل تمييز الصياغة؟

لم أقم بتكوين أي شيء يتعلق بالإبراز والإبراز لا يعمل في منتدى الخاص بي.

كيف أقوم بالبرمجة

يظهر
صورة

هنا إعداداتي

imager

الكود المصدري يبدو صحيحًا على موقعي

مرحباً، الروبي في قائمتي.
آسف لأنني قدمت لقطة شاشة مضللة

يبدو أنها كانت مشكلة CORS، هل يمكن لأي شخص مساعدتي في حلها؟

formatter.js:383  Uncaught (in promise) TypeError: Failed to resolve module specifier '/highlight-js/xxx.jp/9797975efac87d28baa695ae13ca72ccaf5120f5.js'. The base URL is about:blank because import() is called from a CORS-cross-origin script.
    at g (formatter.js:383:1)
    at m (formatter.js:383:1)
    at h (formatter.js:383:1)
    at p (formatter.js:383:1)
    at topic-link.js:14:1
    at formatter.js:383:1
    at composer.js:867:1
    at Array.forEach (<anonymous>)
    at k._decorateAndAdopt (composer.js:867:1)
    at k.init (composer.js:867:1)
    at e (jquery.js:10:1)
    at e (jquery.js:10:1)
    at e (jquery.js:10:1)
    at e (jquery.js:10:1)
    at e (jquery.js:10:1)
    at e (jquery.js:10:1)
    at Object.e [as render] (jquery.js:10:1)
    at jquery.js:10:1
    at e.exports (jquery.js:10:1)
    at jquery.js:10:1
    at Object.l [as patch] (jquery.js:10:1)
    at e.exports (jquery.js:10:1)
    at jquery.js:10:1
    at Object.l [as patch] (jquery.js:10:1)
    at e (jquery.js:10:1)
    at e.rerenderWidget (user-status-bubble.js:12:1)
    at invoke (backburner.js.js:280:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at B._boundAutorunEnd (backburner.js.js:523:1)

تم الحل ذاتيًا

لقد قمت بتغيير /lib/highlight_js.rb
من

def self.path
    "/highlight-js/#{Discourse.current_hostname}/#{version SiteSetting.highlighted_languages}.js"
end

إلى

def self.path
    "https://#{Discourse.current_hostname}/highlight-js/#{Discourse.current_hostname}/#{version SiteSetting.highlighted_languages}.js"
end

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.