kramdown-ansi 0.0.0 → 0.0.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 +4 -4
- data/CHANGES.md +5 -0
- data/README.md +2 -2
- data/kramdown-ansi.gemspec +2 -2
- data/lib/kramdown/ansi.rb +6 -0
- data/lib/kramdown/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd37ac254127e9b4654a9a7621159894bee90193506f2b30fad07e3db7978663
|
4
|
+
data.tar.gz: 9cf0fa562dd8e274b7fba315c85c9148082ba71afdaf5a9f11a4e2ba201787b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e72c1899f5338ed596bd4dc6a367e9ed32d9eb3a1cdcbc9ec9c4b1476557934de5ac5706d63f85a77f73880ad6a0316a26a5b58f4768cf77aebcf0d9076cc1b
|
7
|
+
data.tar.gz: 7cdd5cde26c6e8a15975d75c867fa57b78fe07794b6a785802c6c5098fc6004a2b1a6b95d78eca4ad58df3c0ef214ffc5e2d4d4b27502d436a40db10b5711229
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -39,8 +39,8 @@ puts Kramdown::ANSI.parse(markdown)
|
|
39
39
|
|
40
40
|
| Method | Description |
|
41
41
|
| :----- | :---------- |
|
42
|
-
| `md` executable | Outputs Markdown files with ANSI escape sequences in the terminal |
|
43
|
-
| `git-md` executable | A Git plugin that outputs Markdown formatted git commit messages into the terminal |
|
42
|
+
| `md` executable | Outputs [Markdown](https://spec.commonmark.org/current/) files with ANSI escape sequences in the terminal |
|
43
|
+
| `git-md` executable | A Git plugin that outputs [Markdown](https://spec.commonmark.org/current/) formatted git commit messages into the terminal |
|
44
44
|
|
45
45
|
### The md executable
|
46
46
|
|
data/kramdown-ansi.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: kramdown-ansi 0.0.
|
2
|
+
# stub: kramdown-ansi 0.0.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "kramdown-ansi".freeze
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.1".freeze
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/lib/kramdown/ansi.rb
CHANGED
@@ -13,6 +13,12 @@ class Kramdown::ANSI < Kramdown::Converter::Base
|
|
13
13
|
include Term::ANSIColor
|
14
14
|
include Kramdown::ANSI::Width
|
15
15
|
|
16
|
+
module Terminal::Table::Util
|
17
|
+
def self.ansi_escape(line)
|
18
|
+
line.to_s.gsub(/\e\[.*?m|\e\].*?(\e|\a)\\?/, '')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
16
22
|
class ::Kramdown::Parser::Mygfm < ::Kramdown::Parser::GFM
|
17
23
|
def initialize(source, options)
|
18
24
|
options[:gfm_quirks] << :no_auto_typographic
|
data/lib/kramdown/version.rb
CHANGED