htx 0.0.8 → 0.0.9

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: b83c07872c223b61b939883d9f2f6bc45a1cecc380c4b21701d04a606e7ae381
4
- data.tar.gz: bfbf43071b20b13be3895bf4e358617765f39f276ed1d37c91c93f09c024b48a
3
+ metadata.gz: 395620b3af20b4da17e4413632418481ee28d6d0fe6b46427af240475087efce
4
+ data.tar.gz: bc15b61294daaf218b3a3d5a106de7c9279a7d9e8cb7ebd01002fcd618491b1f
5
5
  SHA512:
6
- metadata.gz: 0dc4f9f8fad2b18266ca93a562fa1565361b330744e8f02134341c1a5982f0821a9b008975adcff7840626d85f05bca223dd433705799c227217584dab1f970c
7
- data.tar.gz: 58756df107105643831511c4faff3f7ccdc96fdcd318d7f65833cb642b4c08be60ab2e2f9cc6ffb999a9980a63a8a15a9b0b8b94c0aab8a4f8447ee61909c5a4
6
+ metadata.gz: 83805b10f30d1846a187b458579a0748339a3956a4123226b7b9ebdb6dcff6cae3dbcd94913c1bbab2c91186ef3f46642f30a4ed9c3f30b072b3efe2f2ceb1ca
7
+ data.tar.gz: 26e48419a9a719f1b8b582ef9e525ffcc37affdcb279f0cba95c6fe4cd2108cc6ec66e9ba4d3216a0ef02aad506d56c4743b059916ba78409f0dc672a760a1fc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/lib/htx/template.rb CHANGED
@@ -62,7 +62,7 @@ module HTX
62
62
  ##
63
63
  # Compiles the HTX template.
64
64
  #
65
- # * +assign_to+ - JavaScript object to assign the template function to (default: <tt>window</tt>).
65
+ # * +assign_to+ - JavaScript object to assign the template function to (default: +window+).
66
66
  # * +indent+ - DEPRECATED. Indentation amount (number) or string (must be only spaces or tabs but not
67
67
  # both) to use for indentation of compiled output (default: indentation of first indented line of
68
68
  # uncompiled template).
@@ -173,7 +173,7 @@ module HTX
173
173
  # Processes an element node.
174
174
  #
175
175
  # * +node+ - Nokogiri node to process.
176
- # * +xmlns+ - True if node is the descendent of a node with an xmlns attribute.
176
+ # * +xmlns+ - True if node is the descendant of a node with an xmlns attribute.
177
177
  #
178
178
  def process_element_node(node, xmlns: false)
179
179
  children = node.children
@@ -263,7 +263,7 @@ module HTX
263
263
  # * +text+ - String to append to the compiled template string.
264
264
  #
265
265
  def append(text)
266
- return @compiled if text.nil? || text.empty?
266
+ return if text.nil? || text.empty?
267
267
 
268
268
  if @close_count > 0
269
269
  close_count = @close_count
@@ -286,8 +286,6 @@ module HTX
286
286
 
287
287
  flush if text.match?(NON_WHITESPACE)
288
288
  @statement_buff << text
289
-
290
- @compiled
291
289
  end
292
290
 
293
291
  ##
@@ -311,8 +309,6 @@ module HTX
311
309
  def flush
312
310
  @compiled << @statement_buff
313
311
  @statement_buff.clear
314
-
315
- @compiled
316
312
  end
317
313
 
318
314
  ##
@@ -369,7 +365,9 @@ module HTX
369
365
  end
370
366
 
371
367
  ##
368
+ # Returns namespace URL of a Nokogiri node.
372
369
  #
370
+ # * +node+ - Nokogiri node to get the namespace of.
373
371
  #
374
372
  def self.namespace(node)
375
373
  node.namespace&.href || DEFAULT_XMLNS[node.name]
@@ -216,6 +216,8 @@ module HTX
216
216
  ##
217
217
  # Flushes buffer during parsing and performs statement detection if appropriate.
218
218
  #
219
+ # * +state+ - Last state that was parsed.
220
+ #
219
221
  def flush(state = nil)
220
222
  return if @buffer.empty?
221
223
 
data/lib/htx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTX
4
- VERSION = '0.0.8'
4
+ VERSION = '0.0.9'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Pickens