summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2021-01-02 21:21:28 +0100
committersharkdp <davidpeter@web.de>2021-01-02 21:21:28 +0100
commit8c0dcf3b57b2c656e869dfe88a9b4137fe67f9e5 (patch)
tree3998b3e67cfe6272529e5e6a834fc50fb97bc524 /doc
parent962b3a78c0891ede2cfb93c9e026d57684668a24 (diff)
Update syntax test instructions
Diffstat (limited to 'doc')
-rw-r--r--doc/assets.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/assets.md b/doc/assets.md
index 2cf3d2d4..9aa2a87c 100644
--- a/doc/assets.md
+++ b/doc/assets.md
@@ -16,7 +16,7 @@ in the `.sublime-syntax` format.
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
3. Run the `assets/create.sh` script. It calls `bat cache --build` to parse all available
- `.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder).
+ `.sublime-syntax` files and serialize them to a `syntaxes.bin` file.
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
`bat` binary.
@@ -38,7 +38,8 @@ to `regex` incompatibilities between `syntect` and Sublime Text).
In order to add a new test file, please follow these steps (let's take "Ruby" as an example):
1. Make sure that you are running the **latest version of `bat`** and that `bat` is available on
- the path.
+ the path. If you are creating a syntax test for a new builtin syntax (see above), make sure that
+ your version of `bat` already has the new syntax builtin.
2. Find an example Ruby source file or write one yourself. If possible, the file should aim to be
"comprehensive" (i.e. include a lot of the possible syntax), but this is not strictly necessary.
A simple file is better than none at all. Also, the files shouldn't be gigantic.