Skip to content

Commit e073142

Browse files
committed
modified build file and added test for codebraid
1 parent 4854c32 commit e073142

File tree

3 files changed

+635
-5
lines changed

3 files changed

+635
-5
lines changed

build.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const languages = [
1313
{ name: 'lua', language: 'lua', identifiers: ['lua'], source: 'source.lua' },
1414
{ name: 'makefile', language: 'makefile', identifiers: ['Makefile', 'makefile', 'GNUmakefile', 'OCamlMakefile'], source: 'source.makefile' },
1515
{ name: 'perl', language: 'perl', identifiers: ['perl', 'pl', 'pm', 'pod', 't', 'PL', 'psgi', 'vcl'], source: 'source.perl' },
16-
{ name: 'r', language: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile'], source: 'source.r' },
16+
{ name: 'r', language: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile', '\{\.r.+?(\})'], source: 'source.r' },
1717
{ name: 'ruby', language: 'ruby', identifiers: ['ruby', 'rb', 'rbx', 'rjs', 'Rakefile', 'rake', 'cgi', 'fcgi', 'gemspec', 'irbrc', 'Capfile', 'ru', 'prawn', 'Cheffile', 'Gemfile', 'Guardfile', 'Hobofile', 'Vagrantfile', 'Appraisals', 'Rantfile', 'Berksfile', 'Berksfile.lock', 'Thorfile', 'Puppetfile'], source: 'source.ruby' },
1818
// Left to its own devices, the PHP grammar will match HTML as a combination of operators
1919
// and constants. Therefore, HTML must take precedence over PHP in order to get proper
@@ -37,7 +37,7 @@ const languages = [
3737
{ name: 'groovy', language: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' },
3838
{ name: 'pug', language: 'pug', identifiers: ['jade', 'pug'], source: 'text.pug' },
3939

40-
{ name: 'js', language: 'javascript', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' },
40+
{ name: 'js', language: 'javascript', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs', '\{\.js.+?(\})'], source: 'source.js' },
4141
{ name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' },
4242
{ name: 'json', language: 'json', identifiers: ['json', 'json5', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' },
4343
{ name: 'jsonc', language: 'jsonc', identifiers: ['jsonc'], source: 'source.json.comments' },
@@ -48,11 +48,11 @@ const languages = [
4848

4949
{ name: 'perl6', language: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' },
5050
{ name: 'powershell', language: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' },
51-
{ name: 'python', language: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' },
51+
{ name: 'python', language: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi', '\{\.python.+?(\})'], source: 'source.python' },
5252
{ name: 'regexp_python', identifiers: ['re'], source: 'source.regexp.python' },
53-
{ name: 'rust', language: 'rust', identifiers: ['rust', 'rs'], source: 'source.rust' },
53+
{ name: 'rust', language: 'rust', identifiers: ['rust', 'rs', '\{\.rust.+?(\})'], source: 'source.rust' },
5454
{ name: 'scala', language: 'scala', identifiers: ['scala', 'sbt'], source: 'source.scala' },
55-
{ name: 'shell', language: 'shellscript', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init'], source: 'source.shell' },
55+
{ name: 'shell', language: 'shellscript', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init', '\{\.bash.+?(\})'], source: 'source.shell' },
5656
{ name: 'ts', language: 'typescript', identifiers: ['typescript', 'ts'], source: 'source.ts' },
5757
{ name: 'tsx', language: 'typescriptreact', identifiers: ['tsx'], source: 'source.tsx' },
5858
{ name: 'csharp', language: 'csharp', identifiers: ['cs', 'csharp', 'c#'], source: 'source.cs' },

test/colorize-fixtures/pr-57.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```{.python .cb.nb jupyter_kernel=python3}
2+
def f(x):
3+
pass
4+
```
5+
6+
```{.r .cb.run}
7+
library(knitr)
8+
```
9+
10+
```{.js .cb.run}
11+
const var = 3;
12+
```
13+
14+
```{.rust .cb.run}
15+
println!("hello there!");
16+
```
17+
18+
```{.bash .cb.run}
19+
ls
20+
echo "Hello There!"
21+
```
22+
23+

0 commit comments

Comments
 (0)