FEATURE: default_code_lang for syntax highlighting is configurable

This commit is contained in:
Sam 2013-12-17 12:08:29 +11:00
parent 2ce75a8523
commit 5bd595c9a6
3 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@ Discourse.Dialect.replaceBlock({
stop: '```',
emitter: function(blockContents, matches) {
var klass = 'lang-auto';
var klass = Discourse.SiteSettings.default_code_lang;
if (matches[1] && acceptableCodeClasses.indexOf(matches[1]) !== -1) {
klass = matches[1];
}

View File

@ -738,6 +738,7 @@ en:
display_name_on_posts: "Also show a user's full name on their posts"
invites_shown: "Maximum invites shown on a user page"
short_progress_text_threshold: "After the number of posts in a topic goes above this number, the progress bar will only show the current post number. If you change the progress bar's width, you may need to change this value."
default_code_lang: "Default programming language syntax highlighting applied to GitHub code blocks (lang-auto, ruby, python etc.)"
notification_types:
mentioned: "%{display_username} mentioned you in %{link}"

View File

@ -200,6 +200,9 @@ posting:
short_progress_text_threshold:
client: true
default: 1000
default_code_lang:
client: true
default: "lang-auto"
email:
email_time_window_mins: 10