postmortem 0.3.2 → 0.3.4

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: b7b614038fcdd254411127eb4c6a008c1331d2c8c9b660064b655e404efcb628
4
- data.tar.gz: 2e6078c75b0b0c2bb7bfb52189baa7773a3f9a2a9b5d7f0f6a805fc9624b1dd9
3
+ metadata.gz: 8fce57ea2428761eeebebff79349ef7f9b4439c571ba02965a2300e621d5bbd9
4
+ data.tar.gz: 0673c91fa2fd523744d780ad9f665b8f683dd0bdd11fea0ffb422d210b7aa8bc
5
5
  SHA512:
6
- metadata.gz: ae4256c6ff0bc3602672abc0caa917b3f25b3e3d463c3557c6f1a15eb783d465398d11eaec0358c531b1d4cc6cbf7c9438169cbb9a594f942f52233b63065ed8
7
- data.tar.gz: eac1a7af623d3e0f8eb880633c35a25cdef88b6fd9c06dad575ba983a88ddf0a74ef08fbcca36f2dc898d360d6bed583c0bd3e8ba39ac666bfb1d61793d24142
6
+ metadata.gz: 825b9b8d1ac22d4cf473a615abfb19328f46c89cec5b4593ef6136928439bd5405c5ce4964ca5b41d47241438a821c49d0042528ae1a8a77840b7bab4f3a04b5
7
+ data.tar.gz: fd4f91e55706a8c2381dfb9288c4c841fb3bc7383b9bd42b769f1d340bb0a76571d7b5edc736be6e7c9372729ae0438c4dbe28f8e04232fca75d6c1d785381a3
@@ -14,7 +14,7 @@
14
14
  const index = document.querySelector('#index');
15
15
  const uuid = index.dataset.uuid;
16
16
  const type = 'index';
17
- const mails = index.innerText
17
+ const mails = index.innerHTML
18
18
  .split('\n')
19
19
  .filter(filter)
20
20
  .map(line => JSON.parse(atob(line)));
@@ -54,7 +54,7 @@ module Postmortem
54
54
  def with_inlined_images(body)
55
55
  parsed = Nokogiri::HTML.parse(body)
56
56
  parsed.css('img').each do |img|
57
- uri = try_uri(img['src'])
57
+ uri = extract_image_uri(img)
58
58
  next unless local_file?(uri)
59
59
 
60
60
  path = located_image(uri)
@@ -63,6 +63,16 @@ module Postmortem
63
63
  parsed.to_s
64
64
  end
65
65
 
66
+ def extract_image_uri(img)
67
+ src_uri = try_uri(img['src'])
68
+ return src_uri if src_uri&.path.present?
69
+
70
+ original_src_uri = try_uri(img['data-originalsrc'])
71
+ return original_src_uri if original_src_uri&.path.present?
72
+
73
+ nil
74
+ end
75
+
66
76
  def local_file?(uri)
67
77
  return false if uri.nil?
68
78
  return true if uri.host.nil?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Postmortem
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmortem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-29 00:00:00.000000000 Z
11
+ date: 2025-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail