plaintext 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4441c66b3c0738f960ae199f27d86d2b39f3bfdbe700641c7684bfec97873f7e
4
- data.tar.gz: 65eda38776c07d5b3594bd54caff6d1e774896c853e379aad5249c54976a2853
3
+ metadata.gz: ffcae76367d81bd94ad8e2ad40b0a59a00b0aa0d00ef8790b8e72e96c37c8a5d
4
+ data.tar.gz: 343182ccc4861b94ca0ac4e1733b60e44e60a840347b1eb877acaf9a4f54f440
5
5
  SHA512:
6
- metadata.gz: ce83e310d6468c1da82bf1a0d4ecc26a39c056f9ac0b1a10d53b8a2e80e4b54590b9c09085d3c48cfc5cab3ec1389357e99737ad7ca14e268c324115b104cdca
7
- data.tar.gz: 883e72d6bae46b1bf6be640d1b6c6d9fe43f257db159c3095572c5d2f9c100722e82842b2963a28d9f5f685773696fa44bad72c24d59c101d10fc5550d3fdce0
6
+ metadata.gz: 99dfbc41ec270e97ce31332a6eb69ddd346212c8c74df85cc77c218bb257ece73dded27d3db8ee35799d76ba73596f38f7942b0e8d2962c5de9a93a643cbe794
7
+ data.tar.gz: beb1371a6b51afe487dfb06574471b0eb3ce5755ab7a1c87ae8a4b609f2db8f0753406e775efe418b94d81e3e324346f8bdee43fd454dfa47b34334b454ec2e8
data/CHANGELOG CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.3.7] - 2025-11-25
8
+
9
+ ### Added
10
+ - Support for text/markdown content type in plaintext handler
11
+
12
+ ## [0.3.6] - 2025-10-16
13
+
14
+ ### Fixed
15
+ - Resolver returns nil if the handler returns nil
16
+
7
17
  ## [0.3.5] - 2025-10-14
8
18
 
9
19
  ### Changed
@@ -3,7 +3,7 @@
3
3
  module Plaintext
4
4
 
5
5
  class PlaintextHandler < FileHandler
6
- CONTENT_TYPES = %w(text/csv text/plain)
6
+ CONTENT_TYPES = %w(text/csv text/plain text/markdown)
7
7
  def initialize
8
8
  @content_types = CONTENT_TYPES
9
9
  end
@@ -36,8 +36,9 @@ module Plaintext
36
36
  # for the file type.
37
37
  def text
38
38
  if handler = find_handler and
39
- text = +handler.text(@file, max_size: max_plaintext_bytes)
39
+ text = handler.text(@file, max_size: max_plaintext_bytes)
40
40
 
41
+ text = +text
41
42
  text.gsub!(/\s+/m, ' ')
42
43
  text.strip!
43
44
  text.mb_chars.compose.limit(max_plaintext_bytes).to_s
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plaintext
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plaintext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Krämer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2025-10-14 00:00:00.000000000 Z
13
+ date: 2025-11-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport