texqc 0.9.0 → 0.9.1

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: 3944f91024dca106c319ca8df2668572bec305757d37e24271019ba9aa2fc5f7
4
- data.tar.gz: 726d1002190bfc6a51ead506ed1fc56e326f565568dac50ebb28b4789e937b38
3
+ metadata.gz: 30419cd7f14c0b3656505a91662d1659e382212b63bef076b4493008838dced0
4
+ data.tar.gz: 7f1be6b8675e760a248750febab2ee595aed0a4748d93ceab4bcab888ce21f27
5
5
  SHA512:
6
- metadata.gz: 6bc7527c93937d7552634aaca518fe386704a1ebdb59736b9458b9fc290ba3bfae6efe5a9841bc75b154fc43fca10fa840b41e24f819077883bc2ca0eebf4179
7
- data.tar.gz: b233f3908532ad80532b6c8bc5b69aad1771f5c8c78c2f17e2cc4626febb76501e8e097b50d2aec70ccc34a3a2cd1b130e791fdbe9a3c7ef5e77b1153de0feef
6
+ metadata.gz: bff8d66ad56903a940dc049c98768dce7432231421f4c04740d993ec8701653f63aebbfb939f9230799a2580faf5fef70dd1a6757101690c454812fcf69ecef4
7
+ data.tar.gz: 1ea0c923034d45f385efebaaa11a068309ef4a7d414d5c702325df4bdf89b6bfbaf801c489dc52e1f2d3022dc255bcc9f8b65b19812ddb5337b2051dcef23da4
data/bin/texqc CHANGED
@@ -4,7 +4,7 @@
4
4
  # SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
5
5
  # SPDX-License-Identifier: MIT
6
6
 
7
- VERSION = '0.9.0'
7
+ VERSION = '0.9.1'
8
8
 
9
9
  $stdout.sync = true
10
10
 
@@ -85,8 +85,9 @@ begin
85
85
  /^Package \S+ Warning: /,
86
86
  /^LaTeX Font Warning: /
87
87
  ]
88
- File.open(f) do |io|
88
+ File.open(f, 'rb') do |io|
89
89
  io.each_line.with_index do |t, i|
90
+ t = t.force_encoding('UTF-8').scrub
90
91
  matches.each do |p|
91
92
  next unless p.match?(t)
92
93
  next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
data/features/cli.feature CHANGED
@@ -73,3 +73,13 @@ Feature: Command Line Processing
73
73
  """
74
74
  Then I run bin/texqc with "article"
75
75
  Then Exit code is zero
76
+
77
+ Scenario: A log with invalid UTF-8 bytes is processed without crashing
78
+ Given I have a "article.log" file with content:
79
+ """
80
+ Some unrelated line with a bad byte: \xFF here
81
+ LaTeX Warning: Label `xxx' multiply defined.
82
+ """
83
+ Then I run bin/texqc with "article"
84
+ Then Exit code is not zero
85
+ And Stdout contains "1 LaTeX processing errors"
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
22
22
  FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
23
- File.write(file, text.gsub('\\xFF', 0xFF.chr))
23
+ File.binwrite(file, text.gsub('\\xFF', 0xFF.chr))
24
24
  end
25
25
 
26
26
  When(%r{^I run bin/texqc with "([^"]*)"$}) do |arg|
data/texqc.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
12
12
  s.required_ruby_version = '>= 3.3'
13
13
  s.name = 'texqc'
14
- s.version = '0.9.0'
14
+ s.version = '0.9.1'
15
15
  s.license = 'MIT'
16
16
  s.summary = 'Quality Control of Your LaTeX Build'
17
17
  s.description = 'Run it after you compile your LaTeX document'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texqc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko