mdless 2.1.66 → 2.1.68
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/mdless/converter.rb +9 -0
- data/lib/mdless/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b736fda9420269317f44d74a9e864d817c7648285119626ac5ff15095a4a84d8
|
|
4
|
+
data.tar.gz: f498ce262b93a142782afc6df250603ef6635f939ba04b6a258dcfe2c38ce4da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9e4488c56c7b4f1879336234b561ce033f606c0d4ca8f2ffb278f1bc0e6aec3c504d844eecfa14046576fd63f5c1c0e4e6e3e75c3f2f53e4a1d7eed5e937334
|
|
7
|
+
data.tar.gz: 2c833ddc688c8e4594a574d36e04a3d7654e693b95332cfecb33c55336cdb457f255e10033f5e5ab448246de2b8b5e81ab0b83ae6cfabd2c9d7de1627c88010f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -275,6 +275,8 @@ Note that if you do this, and you need uncolored output to pipe somewhere, you'l
|
|
|
275
275
|
There are a few great options for Markdown viewing in the Terminal. If `mdless` doesn't do it for you, check out:
|
|
276
276
|
|
|
277
277
|
- [Glow](https://github.com/charmbracelet/glow)
|
|
278
|
+
- [mdcat](https://github.com/BIRSAx2/mdcat)
|
|
279
|
+
- [Apex](https://github.com/ApexMarkdown/apex/wiki/Rendering-Markdown-In-Terminal)
|
|
278
280
|
- [Frogmouth](https://github.com/Textualize/frogmouth)
|
|
279
281
|
|
|
280
282
|
<!--END README-->
|
data/lib/mdless/converter.rb
CHANGED
|
@@ -556,6 +556,14 @@ module CLIMarkdown
|
|
|
556
556
|
end.join("\n")
|
|
557
557
|
end
|
|
558
558
|
|
|
559
|
+
def reset_terminal
|
|
560
|
+
return unless MDLess.options[:color]
|
|
561
|
+
|
|
562
|
+
# less -r leaves SGR attributes active on the terminal when the last
|
|
563
|
+
# visible line is colored; reset the real stdout after the pager exits.
|
|
564
|
+
$stdout.print "\e[0m"
|
|
565
|
+
end
|
|
566
|
+
|
|
559
567
|
def page(text, &callback)
|
|
560
568
|
read_io, write_io = IO.pipe
|
|
561
569
|
|
|
@@ -616,6 +624,7 @@ module CLIMarkdown
|
|
|
616
624
|
out.uncolor! unless MDLess.options[:color]
|
|
617
625
|
|
|
618
626
|
if MDLess.options[:pager]
|
|
627
|
+
at_exit { reset_terminal } if MDLess.options[:color]
|
|
619
628
|
page(out)
|
|
620
629
|
else
|
|
621
630
|
$stdout.print out.rstrip
|
data/lib/mdless/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mdless
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.68
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redcarpet
|