]> BookStack Code Mirror - bookstack/commitdiff
Added vb.net code language option
authorDan Brown <redacted>
Wed, 4 Aug 2021 19:56:34 +0000 (20:56 +0100)
committerDan Brown <redacted>
Wed, 4 Aug 2021 19:56:34 +0000 (20:56 +0100)
Related to #2869

resources/js/services/code.js
resources/sass/_components.scss
resources/views/components/code-editor.blade.php

index 5727cd2b79a06f4e68b83eb68f1e1e34e2424300..361ccc3f18224108283ad7d67772817c46bb2a26 100644 (file)
@@ -26,6 +26,7 @@ import 'codemirror/mode/rust/rust';
 import 'codemirror/mode/shell/shell';
 import 'codemirror/mode/sql/sql';
 import 'codemirror/mode/toml/toml';
+import 'codemirror/mode/vb/vb';
 import 'codemirror/mode/vbscript/vbscript';
 import 'codemirror/mode/xml/xml';
 import 'codemirror/mode/yaml/yaml';
@@ -87,6 +88,8 @@ const modeMap = {
     sql: 'text/x-sql',
     vbs: 'vbscript',
     vbscript: 'vbscript',
+    'vb.net': 'text/x-vb',
+    vbnet: 'text/x-vb',
     xml: 'xml',
     yaml: 'yaml',
     yml: 'yaml',
index ab562006fd6ba488004c7833634c6f12e6b6ad46..95ba81520bc431eaac45a9b7dba22931126505a4 100644 (file)
@@ -629,7 +629,7 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group {
 }
 
 .code-editor .lang-options {
-  max-width: 480px;
+  max-width: 540px;
   margin-bottom: $-s;
   a {
     margin-inline-end: $-xs;
index 011840465a63ff480f048f91b9e9f18bda3baf37..c593d0e2389adde14d7091a3f3d7b73c19a1ae10 100644 (file)
@@ -35,6 +35,7 @@
                             <a refs="code-editor@languageLink" data-lang="shell">Shell/Bash</a>
                             <a refs="code-editor@languageLink" data-lang="SQL">SQL</a>
                             <a refs="code-editor@languageLink" data-lang="VBScript">VBScript</a>
+                            <a refs="code-editor@languageLink" data-lang="VB.NET">VB.NET</a>
                             <a refs="code-editor@languageLink" data-lang="XML">XML</a>
                             <a refs="code-editor@languageLink" data-lang="YAML">YAML</a>
                         </small>