Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhartwell/haml-rs
A pure Rust implementation of the Haml template language
https://github.com/jhartwell/haml-rs
Last synced: 3 months ago
JSON representation
A pure Rust implementation of the Haml template language
- Host: GitHub
- URL: https://github.com/jhartwell/haml-rs
- Owner: jhartwell
- License: mit
- Created: 2018-07-04T02:42:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-07T22:41:11.000Z (almost 4 years ago)
- Last Synced: 2024-10-07T02:45:36.629Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 227 KB
- Stars: 59
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update
I have had some personal issues come up and I have ignored this project for a few months because of it. After getting back into it I realized how badly it was written. I am working on rewriting the codebase so that it is clearer and easier to work with. While doing that I will be using the tests from the Ruby implementation to ensure that nothing is broken and work on achieving greater compatibility.
# Haml-rs
[![](https://img.shields.io/crates/v/hamlrs.svg?maxAge=25920)](https://crates.io/crates/hamlrs) ![Travis CI Build Status](https://travis-ci.org/Haml-rs/haml-rs.svg?branch=master)
This is a library for parsing [Haml](http://haml.info/) templates. You are able to get Haml-rs on [Crates.io](https://crates.io/crates/hamlrs). The aim for this is to produce identical HTML to what the Ruby [Haml gem](https://rubygems.org/gems/haml) produces.
## Usage
To include haml-rs in your project add the following to your Cargo.toml:
```
[dependencies]
hamlrs = "0.4.2"
```
Then add the following to your code:```rust
extern crate haml;
```
## Example#### Library
```rust
extern crate haml;fn main() {
let test_haml = "%span";
let html = haml::to_html(&test_haml);
}
```### Stability
This software is in its early stages and as such there may be issues with stability.
If you find any bugs please don't hesitate to open an [issue on github](https://github.com/Haml-rs/haml-rs/issues) or, if you want, you can reach out directly to me at [email protected]
## Integration tests
There are currently a few integration tests (and more to come). If you are going to contribute to an integration test please make sure that the HTML file that is generated by the Ruby [Haml gem](https://rubygems.org/gems/haml) so that we can ensure that we are producing the same output as the reference implementation.
## Current limitations
There is no variable/expression support in Haml-rs. This is something that is being thought about and if you want to add your thoughts you are more than welcome to comment [here](https://github.com/jhartwell/haml-rs/issues/6).
## License
This project is licensed under the [MIT license](https://github.com/jhartwell/haml-rs/blob/master/LICENSE).
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Haml-rs by you, shall be licensed as MIT, without any additional terms or conditions.
If you have any questions you can reach me via email at [email protected]