Skip to content

Commit

Permalink
feat: cairo syntax hl (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
julio4 authored Oct 23, 2024
1 parent 70be4b9 commit 88ec4a9
Show file tree
Hide file tree
Showing 60 changed files with 3,126 additions and 998 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ c
Then, in the markdown file, you can use the following syntax to include only the code between the delimiting comments:

````markdown
````rust
````cairo
{{#include ../../listings/path/to/listing/src/contract.cairo:anchor_name}}
\```
````
Expand All @@ -215,7 +215,7 @@ b
Using `#rustdoc_include` you can have the same result, but users can expand the code in the book to see the whole file (used for showing tests):
````markdown
````rust
````cairo
{{#rustdoc_include ../../listings/path/to/listing/src/contract.cairo:anchor_name}}
\```
````
Expand Down
8 changes: 7 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ title = "Starknet by Example"
[build]
extra-watch-dirs = ["listings", "po"]

[preprocessor.gettext]
[preprocessor.cairo]
after = ["links"]

[preprocessor.gettext]
after = ["cairo"]

[preprocessor.last-changed]
command = "mdbook-last-changed"
renderer = ["html"]

[output.html.code.hidelines]
cairo = "# "

[output.html]
git-repository-url = "https://github.com/NethermindEth/StarknetByExample"
edit-url-template = "https://github.com/NethermindEth/StarknetByExample/edit/main/{path}"
Expand Down
Loading

0 comments on commit 88ec4a9

Please sign in to comment.