hamlit 2.15.2 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d94d8367c92ca140f6438760deeecddf3e59d4f7e5edef0833e9afbe5851e68
4
- data.tar.gz: dc6cfc8aa8ed607bdb4da4d99a60d391d0fe0bf773059bf868053248949f3bae
3
+ metadata.gz: de464e04c0b09e109a52ccae59ad85ee2a07875eaf903d8d0208d8b4d24b3d7d
4
+ data.tar.gz: a495ef4fc7e65d0e51a3538146a099d3c313b987fe11a03ef4da2468e2cabe5c
5
5
  SHA512:
6
- metadata.gz: 2704b342b72349cd9d4ed144671ed4a0e829f8194d920c4591c129d5be81fc73cf79b11e3917f10b3981570896794293a82bd66e959654d2072c1c348d747b2c
7
- data.tar.gz: 90151c07372ca4fbc5d25674d47a239fcd47e87619b7d0bc117f51b8b77d03b649179467ae590e3f11b509e5a576404b08dbb723ba7f7add4c27fa5106326b3b
6
+ metadata.gz: 22f7bd667c39909360a6405768b71b30769d5ea3aeff02e067f48a05ee89c07dda6e2d5467eafb4f000233ece666704483e31e325bda0cb16e53cb88beb97668
7
+ data.tar.gz: 83d3434d5953eebc388eeebddbf10f76d07dece448cacb00f96bfe0da80b8488fbc311002f81cc455ccdb5586ad70a21fd76497927fe656b586e2bcfde2b3bc1
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. This
4
4
  project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
5
5
  [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
6
6
 
7
+ ## [2.16.0](https://github.com/k0kubun/hamlit/compare/v2.15.2...v2.16.0) - 2022-02-03
8
+
9
+ ### Added
10
+
11
+ - Raise an exception on a Haml-level syntax error with `hamlit compile -c`
12
+ [#189](https://github.com/k0kubun/hamlit/issues/189)
13
+ *Thanks to @dlwr*
14
+
7
15
  ## [2.15.2](https://github.com/k0kubun/hamlit/compare/v2.15.1...v2.15.2) - 2022-01-04
8
16
 
9
17
  ### Fixed
data/lib/hamlit/cli.rb CHANGED
@@ -106,6 +106,7 @@ module Hamlit
106
106
  Hamlit::Engine.options.to_h.merge(
107
107
  escape_attrs: options[:escape_attrs],
108
108
  escape_html: options[:escape_html],
109
+ check_syntax: options[:check],
109
110
  )
110
111
  end
111
112
 
data/lib/hamlit/engine.rb CHANGED
@@ -21,6 +21,7 @@ module Hamlit
21
21
  hr img input isindex keygen link menuitem meta
22
22
  param source track wbr),
23
23
  filename: "",
24
+ check_syntax: false,
24
25
  )
25
26
 
26
27
  use Parser
data/lib/hamlit/parser.rb CHANGED
@@ -20,6 +20,7 @@ module Hamlit
20
20
  autoclose
21
21
  escape_html
22
22
  escape_attrs
23
+ check_syntax
23
24
  ].freeze
24
25
 
25
26
  def initialize(options = {})
@@ -35,6 +36,7 @@ module Hamlit
35
36
  end
36
37
  HamlParser.new(HamlOptions.new(@options)).call(template)
37
38
  rescue ::Hamlit::HamlError => e
39
+ raise e if @options[:check_syntax]
38
40
  error_with_lineno(e)
39
41
  end
40
42
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hamlit
3
- VERSION = '2.15.2'
3
+ VERSION = '2.16.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.2
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  - !ruby/object:Gem::Version
361
361
  version: '0'
362
362
  requirements: []
363
- rubygems_version: 3.1.2
363
+ rubygems_version: 3.2.22
364
364
  signing_key:
365
365
  specification_version: 4
366
366
  summary: High Performance Haml Implementation