Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport split parser changes #56

Merged
merged 9 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
[package]
name = "tree-sitter-djot"
description = "Djot grammar for the tree-sitter parsing library"
version = "0.0.1"
keywords = ["incremental", "parsing", "Djot"]
version = "2.0.0"
keywords = ["incremental", "parsing", "tree-sitter", "Djot"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-djot"
repository = "https://github.com/treeman/tree-sitter-djot"
edition = "2018"
license = "MIT"

build = "bindings/rust/build.rs"
include = [
"bindings/rust/*",
"grammar.js",
"queries/*",
"src/*",
]
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]

[lib]
path = "bindings/rust/lib.rs"
Expand Down
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 22 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,8 @@ This is an experimental [Tree-sitter][] grammar for [Djot][].

# Features

Aims to be fully feature complete with the [Djot specification][]:

- [x] Inline syntax
- [x] Links
- [x] Image
- [x] Autolink
- [x] Verbatim
- [x] Emphasis/strong
- [x] Highlighted
- [x] Super/subscript
- [x] Insert/delete
- [x] Smart punctuation
- [x] Math
- [x] Footnote reference
- [x] Line break
- [x] Comment
- [x] Symbols
- [x] Raw inline
- [x] Span
- [x] Inline attributes
- [x] Block syntax
- [x] Paragraph
- [x] Heading
- [x] Block quote
- [x] List item with the different marker types
- [x] List
- [x] Code block
- [x] Thematic break
- [x] Raw block
- [x] Div
- [x] Pipe table
- [x] Reference link definition
- [x] Footnote
- [x] Block attribute

Also contains some extra features not included in the Djot standard:
Aims to be fully feature complete with the [Djot specification][] with a few extra features:


- Parses an optional frontmatter at the very start of the file, e.g:

Expand All @@ -49,7 +15,26 @@ Also contains some extra features not included in the Djot standard:
---
````

- Highlights standalone `TODO`, `NOTE` and `FIXME`.
- Parses tight sublists.

Normally in Djot you need to surround a list inside a list with spaces:

```
- List

- Another
- list
```

This grammar doesn't require a space and recognizes this as a sublist:

```
- List
- Another
- list
```

- Parses standalone `TODO`, `NOTE` and `FIXME`.

[Tree-sitter]: https://tree-sitter.github.io/tree-sitter/
[Djot]: https://djot.net/
Expand Down
Loading