Skip to content

Commit

Permalink
Merge pull request #56 from treeman/backport_split
Browse files Browse the repository at this point in the history
Backport split parser changes
  • Loading branch information
treeman authored Jan 28, 2025
2 parents 886601b + 4ab6158 commit 639c2dd
Show file tree
Hide file tree
Showing 19 changed files with 78,205 additions and 85,179 deletions.
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

0 comments on commit 639c2dd

Please sign in to comment.