marble_markdown 0.1 → 0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/marble.rb +30 -30
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e054f641aae366f4b79f6fdbb2fdd5806ec3dce82b1218873887723c42f37c9
4
- data.tar.gz: 878fc70ddeca19a7590f8d79879a47a4e565b20d1fca9e05b3b5dd77ac0419cb
3
+ metadata.gz: 85a786bf9bdee8f78e3a39ca8a8f2ee4c424f250d15ad10f5e17d649312c40e3
4
+ data.tar.gz: ba0b74eba7dc54843962412965799be2ef2691c86b01ff6a89a04d703eb7f7f3
5
5
  SHA512:
6
- metadata.gz: 63b99e4feab505fdd58ebb1634813ecc7ab8a84ca87916fcddde89a27c73ab74ea484bd9e6e0f6946f08ad7b952b28250723a42560e436978b0a77cde8443222
7
- data.tar.gz: fd1d19b166fbf3abc153ff344c9cd8019404f337186455862a9c4cc8bfb55beb4692247df0b14626a1a015b5cb29fe9a82098c08ec9256a9c0cb1d9bd95b1c4a
6
+ metadata.gz: c1ac67a16b1858a0e6885ee61cbe128c5f06b34b84dc7ba542b0b44b9a670a60beb192e74dd0305dc790f849cae4ce1a51e69d1e388a4f075a796025e0bca691
7
+ data.tar.gz: d2a6b62c6d31a2ad5d5f83c9b59bc321f7c88b2c92b2c52c5b35bc06074832b4b876704221b919dfd9dfd2ffa526fc5c0ee4751b42c6eea1eeb9dce5685ed6d8
data/lib/marble.rb CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  # The Marble Markdown formatter.
10
10
  module Marble
11
- VERSION = '0.1'
11
+ VERSION = '0.2'
12
12
 
13
13
  # build a hash of characters that must be escaped and their escaped forms,
14
14
  # and a regex to detect the former.
@@ -126,40 +126,40 @@ module Marble
126
126
  alias italics italic
127
127
  alias strike strikethrough
128
128
  end
129
- end
130
129
 
131
- # The most common formatting operations are added to String as extension methods.
132
- class String
133
- # This string with all Markdown syntax escaped.
134
- def escape
135
- Marble.escape self
136
- end
130
+ # The most common formatting operations are added to String as extension methods.
131
+ refine String do
132
+ # This string with all Markdown syntax escaped.
133
+ def escape
134
+ Marble.escape self
135
+ end
137
136
 
138
- # Embolden this string.
139
- def bold
140
- Marble.bold self
141
- end
137
+ # Embolden this string.
138
+ def bold
139
+ Marble.bold self
140
+ end
142
141
 
143
- # Display this string as code.
144
- def code
145
- Marble.code self
146
- end
142
+ # Display this string as code.
143
+ def code
144
+ Marble.code self
145
+ end
147
146
 
148
- # Italicise this string.
149
- def italic
150
- Marble.italic self
151
- end
147
+ # Italicise this string.
148
+ def italic
149
+ Marble.italic self
150
+ end
152
151
 
153
- # Strike-out this string.
154
- def strikethrough
155
- Marble.strikethrough self
156
- end
152
+ # Strike-out this string.
153
+ def strikethrough
154
+ Marble.strikethrough self
155
+ end
157
156
 
158
- # Create a link using this string as the text.
159
- def link(url)
160
- Marble.link self, url
161
- end
157
+ # Create a link using this string as the text.
158
+ def link(url)
159
+ Marble.link self, url
160
+ end
162
161
 
163
- alias italics italic
164
- alias strike strikethrough
162
+ alias_method :italics, :italic
163
+ alias_method :strike, :strikethrough
164
+ end
165
165
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marble_markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - biqqles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: