Skip to content

Commit

Permalink
Rewrite Package (#22)
Browse files Browse the repository at this point in the history
This commit is basically a complete rewrite of the whole package with every
aspect being touched, while re-using as much of it as possible.

Supported template languages are: CSS, JavaScript, JSON, HTML, Markdown, XML

Syntax definitions extend bundled ones from ST4152+.

1. Package is re-structured to better organize all the supported syntaxes.

2. Snippets (and other resources) are indented using tabs as spaces don't
   play well with tab-indented target documents.

   E.g.: If snippets would be indented with spaces but committed to a document
   using tabs, spaces would remain and cause mixed indentation.
   Tabs are however converted to the correct number of spaces, when committed
   to a document using spaces for indentation.

3. a snippet for each tag is added so typing e.g. "if" and hitting tab expands
   to equivalent {% if ... %} tag.

4. Previous Jinja.sublime-syntax is mainly re-used but improved in various
   aspects by re-using patterns from Python syntax.
   It is renamed to "Text (Jinja)" and can be used for templates, which no
   dedicated syntax is shipped for (e.g.: LaTeX, ...).
  • Loading branch information
deathaxe committed May 17, 2024
1 parent 2fa415d commit 22e7d3d
Show file tree
Hide file tree
Showing 115 changed files with 5,016 additions and 2,132 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.github/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
tests/ export-ignore
syntax_test_* export-ignore
*.png export-ignore
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Report
description: File a bug report to address an issue in BetterJinja !
description: File a bug report to address an issue in Jinja2 !

body:
- type: textarea
Expand Down Expand Up @@ -38,7 +38,7 @@ body:

- type: input
attributes:
label: BetterJinja version
label: Jinja2 version
placeholder: "e.g. 1.0.0"
validations:
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement_or_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Enhancement or feature request.
description: File an enhancement/feature request to make BetterJinja more amazing !
description: File an enhancement/feature request to make Jinja2 more amazing !

body:
- type: textarea
attributes:
label: Description of your enhancement/feature request proposal.
description: |
A description of what enhancement and (or) feature request, you'd like to see in BetterJinja.
A description of what enhancement and (or) feature request, you'd like to see in Jinja2.
validations:
required: true

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/syntax_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ jobs:
fail-fast: false
matrix:
include:
- build: 4107
default_packages: v4107
- build: 4126
default_packages: v4126
- build: 4143
default_packages: v4143
- build: 4152
default_packages: v4152
- build: 4169
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cmd
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fix package name "Jinja2" in various resource files (fixes #15)
- Fix syntax tests not running (fixes #18)
- Fix snippets' indentation
- Fix snippets' indentation

## [2.0.0]

- Reorganize whole package
- Rewrite all syntax definitons extending ST's (CSS, JavaScript, JSON, HTML, Markdown, XML, YAML)
- fix snippet indentation (now using tabs)
Loading

0 comments on commit 22e7d3d

Please sign in to comment.