Skip to content

Commit e4bc52f

Browse files
authored
Merge pull request #115 from iterative/fix-comment-highlighting
2 parents 24e4797 + ab13d67 commit e4bc52f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

packages/example/content/docs/examples.md

+10
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ Second Tab Three
7575
</tab>
7676

7777
</toggle>
78+
79+
## Skip code with hash
80+
81+
```cli
82+
$ gto assign cv-class --version v0.1.13 --stage dev
83+
Created git tag 'cv-class#dev#1' that assigns stage to version 'v0.1.13'
84+
To push the changes upstream, run:
85+
git push origin cv-class#dev#1 #this is a comment
86+
#This is a comment
87+
```

packages/gatsby-theme-iterative/config/prismjs/dvc.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ Prism.languages.cli = {
7676
...bash
7777
}
7878
},
79-
comment: bash.comment
79+
comment: {
80+
pattern: /(^|[\s^"{\\$])#.*/,
81+
lookbehind: true
82+
}
8083
}
8184

8285
Prism.languages.dvc = Prism.languages.cli

packages/gatsby-theme-iterative/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dvcorg/gatsby-theme-iterative",
3-
"version": "0.1.21",
3+
"version": "0.1.22",
44
"description": "",
55
"main": "index.js",
66
"types": "src/typings.d.ts",

0 commit comments

Comments
 (0)