sterile 1.0.26 → 1.0.28
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/lib/sterile/data/smart_format_rules.rb +19 -9
- data/lib/sterile/smart_format.rb +85 -4
- data/lib/sterile/version.rb +1 -1
- data/test/test_sterile.rb +116 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af85f613df97b0ecc301efe9c80e2542a382e54ccdd92b51643dc27897bc04c3
|
|
4
|
+
data.tar.gz: 4c5fcbd47f06a3ca28c4bde53150d20276fc419b0a6d87ed0f57b2bd81b14b40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71b43104d13031c2af273917149884957499ebb60de85b6e9889184b8b67ae5b902e4581c36af1b08c84a1b6ea975c8df8526c1df45426916ac4f19f209e9995
|
|
7
|
+
data.tar.gz: f3312ce5d49836154ce8b5f7f332bac27bd74ad4943e67fb5eced0eb86b1b2e477e8f28183c1f4a650b2682bc6b725a5a8ff013d47e64d980cc6b0e7a6593741
|
|
@@ -10,6 +10,8 @@ module Sterile
|
|
|
10
10
|
["'twas", "’twas"],
|
|
11
11
|
["'tis", "’tis"],
|
|
12
12
|
["'twill", "’twill"],
|
|
13
|
+
["'Tain't", "’Tain’t"],
|
|
14
|
+
[/\'(Tis|Twas|Twill|Twere)\b/, "’\\1"],
|
|
13
15
|
["'til", "’til"],
|
|
14
16
|
["'bout", "’bout"],
|
|
15
17
|
["'nuff", "’nuff"],
|
|
@@ -17,15 +19,23 @@ module Sterile
|
|
|
17
19
|
["'cause", "’cause"],
|
|
18
20
|
["'cos", "’cos"],
|
|
19
21
|
["i'm", "i’m"],
|
|
20
|
-
|
|
21
|
-
[
|
|
22
|
-
|
|
22
|
+
# The Afrikaans article ("'n man"), and "rock 'n roll".
|
|
23
|
+
[/\'n(?=[\p{Z}\s])/, "’n"],
|
|
24
|
+
# Not three hyphens ("h---"); a longer run still pairs off.
|
|
25
|
+
[/(?<!-)--(?!-(?!-))|(?<=--)--/, "—"],
|
|
23
26
|
["...", "…"],
|
|
27
|
+
# A quote after a dash opens (word--"quote"), unless a space, closing
|
|
28
|
+
# punctuation, another dash or the end follows ("Why--" he said).
|
|
29
|
+
[/([—–])"(?![\p{Z}\s,;:!?)\]—–]|\.(?![\p{Z}\s]?\.)|\z)/, "\\1“"],
|
|
30
|
+
[/([—–])\'(?![\p{Z}\s,;:!?)\]—–\d]|\.(?![\p{Z}\s]?\.)|\z)/, "\\1‘"],
|
|
24
31
|
["(tm)", "™"],
|
|
25
32
|
["(TM)", "™"],
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
[
|
|
33
|
+
# Only where it's clearly a copyright notice, so list markers like
|
|
34
|
+
# "(a) … (b) … (c) …" survive.
|
|
35
|
+
[/\([cC]\)(?=[\p{Z}\s]*\d)/, "©"],
|
|
36
|
+
[/(copyright[\p{Z}\s]+)\([cC]\)/i, "\\1©"],
|
|
37
|
+
# Only when attached to the preceding word (e.g. "Acme(R)").
|
|
38
|
+
[/(?<=[^\p{Z}\s(])\([rR]\)/, "®"],
|
|
29
39
|
['"/"', "”/“"],
|
|
30
40
|
["'/'", "’/‘"],
|
|
31
41
|
[/([iI][nN]\s+)\'(\d\d\D)/, "\\1’\\2"],
|
|
@@ -36,11 +46,12 @@ module Sterile
|
|
|
36
46
|
[/"([:;])/, "”\\1"],
|
|
37
47
|
[/\'s$/, "’s"],
|
|
38
48
|
[/\'(\d\d(?:’|\')?s)/, "’\\1"],
|
|
39
|
-
|
|
49
|
+
# A quote opens after a space, a non-breaking one included.
|
|
50
|
+
[/([\p{Z}\s]| |\A|"|\(|\[)\'/, "\\1‘"],
|
|
40
51
|
# [/(\d+)"/, "\\1″"],
|
|
41
52
|
# [/(\d+)\'/, "\\1′"],
|
|
42
53
|
[/(\S)\'([^\'\s])/, "\\1’\\2"],
|
|
43
|
-
[/(\s
|
|
54
|
+
[/([\p{Z}\s]| |\A|\(|\[)"(?![\p{Z}\s]| )/, "\\1“"],
|
|
44
55
|
[/"(\s|\S|\Z)/, "”\\1"],
|
|
45
56
|
[/\'([\s.]|\Z)/, "’\\1"],
|
|
46
57
|
[/(\b[1-9]\d*|0)x([1-9]\d*|0\b)/, "\\1×\\2"],
|
|
@@ -49,4 +60,3 @@ module Sterile
|
|
|
49
60
|
end
|
|
50
61
|
end
|
|
51
62
|
end
|
|
52
|
-
|
data/lib/sterile/smart_format.rb
CHANGED
|
@@ -18,18 +18,99 @@ module Sterile
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
# Like +smart_format+, but works with HTML/XML (somewhat).
|
|
21
|
+
# Like +smart_format+, but works with HTML/XML (somewhat). Quotes and
|
|
22
|
+
# apostrophes are formatted by the text on either side of them, across
|
|
23
|
+
# inline tags ("<em>Bible</em>'s"), starting over in each block and
|
|
24
|
+
# after a line break.
|
|
22
25
|
#
|
|
23
26
|
def smart_format_tags(string)
|
|
24
27
|
string = string.gsub(/[\p{Z}\s]+(<\/[a-zA-Z]+>)(['"][a-zA-Z])/, "\\1 \\2") # Fixes quote after whitespace + tag "<em>Dan. </em>'And"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
fragment = Nokogiri::HTML::DocumentFragment.parse string
|
|
29
|
+
smart_format_text_runs(fragment).each do |run|
|
|
30
|
+
texts = run.map(&:content)
|
|
31
|
+
run.each_with_index do |node, index|
|
|
32
|
+
before = texts[0...index].reverse.find { |text| !text.empty? }
|
|
33
|
+
after = texts[(index + 1)..-1].find { |text| !text.empty? }
|
|
34
|
+
node.content = smart_format_in_context(texts[index], before, after)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
fragment.to_html.encode_entities
|
|
28
38
|
end
|
|
29
39
|
|
|
30
40
|
|
|
31
41
|
private
|
|
32
42
|
|
|
43
|
+
# Elements that start a new stretch of text. Text in any other element,
|
|
44
|
+
# known or not, reads on from the text before it.
|
|
45
|
+
SMART_FORMAT_BLOCK_TAGS = %w[
|
|
46
|
+
address article aside blockquote body br caption center dd details dialog dir div dl dt fieldset
|
|
47
|
+
figcaption figure footer form h1 h2 h3 h4 h5 h6 header hgroup hr html li main menu nav ol p pre
|
|
48
|
+
section summary table tbody td tfoot th thead title tr ul
|
|
49
|
+
].freeze
|
|
50
|
+
|
|
51
|
+
# Stands in for neighboring text no rule should treat as a space, a letter
|
|
52
|
+
# or punctuation (a word joiner).
|
|
53
|
+
SMART_FORMAT_NEUTRAL = "\u2060".freeze
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Text nodes in document order, grouped into runs that read as continuous
|
|
57
|
+
# text: a run ends at a block element or a line break.
|
|
58
|
+
#
|
|
59
|
+
def smart_format_text_runs(node, runs = [[]])
|
|
60
|
+
node.children.each do |child|
|
|
61
|
+
if child.text?
|
|
62
|
+
runs.last << child
|
|
63
|
+
elsif child.element? && SMART_FORMAT_BLOCK_TAGS.include?(child.name)
|
|
64
|
+
runs << []
|
|
65
|
+
smart_format_text_runs child, runs
|
|
66
|
+
runs << []
|
|
67
|
+
elsif child.element?
|
|
68
|
+
smart_format_text_runs child, runs
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
runs
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Smart format text that sits between two other pieces of text. One
|
|
76
|
+
# character stands in for each neighbor while the rules run.
|
|
77
|
+
#
|
|
78
|
+
def smart_format_in_context(text, before, after)
|
|
79
|
+
head = smart_format_stand_in_before(before)
|
|
80
|
+
tail = smart_format_stand_in_after(after)
|
|
81
|
+
formatted = smart_format("#{head}#{text}#{tail}")
|
|
82
|
+
if formatted.start_with?(head) && formatted.end_with?(tail) && formatted.length >= head.length + tail.length
|
|
83
|
+
formatted[head.length, formatted.length - head.length - tail.length]
|
|
84
|
+
else
|
|
85
|
+
smart_format(text.dup)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def smart_format_stand_in_before(text)
|
|
91
|
+
case text
|
|
92
|
+
when nil then ""
|
|
93
|
+
when /(?:--|[—–])\z/ then "—"
|
|
94
|
+
when /[\p{Z}\s]\z/ then " "
|
|
95
|
+
when /[(\[{"“]\z/ then "["
|
|
96
|
+
when /[\p{L}\p{N}]\z/ then text[-1]
|
|
97
|
+
else SMART_FORMAT_NEUTRAL
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def smart_format_stand_in_after(text)
|
|
103
|
+
case text
|
|
104
|
+
when nil then ""
|
|
105
|
+
when /\A[\p{Z}\s]/ then " "
|
|
106
|
+
when /\A\p{L}/ then "a" # Any letter will do, but "s" would end the "'s" rule.
|
|
107
|
+
when /\A[\p{N}:;]/ then text[0]
|
|
108
|
+
when /\A(?:[,!?)\]}]|\.(?![\p{Z}\s]?\.))/ then ","
|
|
109
|
+
else SMART_FORMAT_NEUTRAL
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
|
|
33
114
|
# Lazy load smart formatting rules
|
|
34
115
|
#
|
|
35
116
|
def smart_format_rules
|
data/lib/sterile/version.rb
CHANGED
data/test/test_sterile.rb
CHANGED
|
@@ -55,8 +55,98 @@ class TestSterile < Minitest::Test
|
|
|
55
55
|
assert_equal "1x01", Sterile.smart_format("1x01")
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
def
|
|
59
|
-
|
|
58
|
+
def test_smart_format_quote_after_dash
|
|
59
|
+
assert_equal "then—“go” and then—‘go’", Sterile.smart_format(%q{then—"go" and then—'go'})
|
|
60
|
+
assert_equal "word—“go” and word—‘go’", Sterile.smart_format(%q{word--"go" and word--'go'})
|
|
61
|
+
assert_equal "1914–“go”", Sterile.smart_format(%q{1914–"go"})
|
|
62
|
+
assert_equal "composition—“… Because", Sterile.smart_format(%q{composition--"... Because})
|
|
63
|
+
assert_equal "composition—“. . . Because", Sterile.smart_format(%q{composition--". . . Because})
|
|
64
|
+
assert_equal "rock—’90s style", Sterile.smart_format(%q{rock--'90s style})
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def test_smart_format_closing_quote_after_dash
|
|
68
|
+
assert_equal "“Hello—” he said", Sterile.smart_format(%q{"Hello--" he said})
|
|
69
|
+
assert_equal "“Wait—”, he said. “No—”.", Sterile.smart_format(%q{"Wait--", he said. "No--".})
|
|
70
|
+
assert_equal "“I can’t—”", Sterile.smart_format(%q{"I can't--"})
|
|
71
|
+
assert_equal "‘Why—’ he said", Sterile.smart_format(%q{'Why--' he said})
|
|
72
|
+
assert_equal "“Soda—” and “Movie—”—or", Sterile.smart_format(%q{"Soda--" and "Movie--"--or})
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_smart_format_capitalized_elisions
|
|
76
|
+
assert_equal "’Tis so. ’Twas so. ’Twill be. ’Twere so. ’Tain’t so.", Sterile.smart_format("'Tis so. 'Twas so. 'Twill be. 'Twere so. 'Tain't so.")
|
|
77
|
+
assert_equal "“’Tis the season,” ’tis said", Sterile.smart_format(%q{"'Tis the season," 'tis said})
|
|
78
|
+
assert_equal "‘Tissue’ and ‘Twist’", Sterile.smart_format("'Tissue' and 'Twist'")
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def test_smart_format_quotes_after_non_breaking_space
|
|
82
|
+
assert_equal "word “quote” and ‘quote’", Sterile.smart_format("word \"quote\" and 'quote'")
|
|
83
|
+
assert_equal "word “quote” and ‘quote’", Sterile.smart_format(%q{word "quote" and 'quote'})
|
|
84
|
+
assert_equal "“quote” word and ‘quote’ word", Sterile.smart_format("\"quote\" word and 'quote' word")
|
|
85
|
+
assert_equal "“quote” word and ‘quote’ word", Sterile.smart_format(%q{"quote" word and 'quote' word})
|
|
86
|
+
assert_equal "said ” and", Sterile.smart_format("said \" and")
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def test_smart_format_tags_quotes_after_non_breaking_space
|
|
90
|
+
assert_equal "word “quote” and ‘quote’", Sterile.smart_format_tags(%q{word "quote" and 'quote'})
|
|
91
|
+
assert_equal "<em>word </em>“quote”", Sterile.smart_format_tags(%q{<em>word </em>"quote"})
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def test_smart_format_afrikaans_article
|
|
95
|
+
assert_equal "Dit was ’n besef—’n waarheid. ’n Man", Sterile.smart_format("Dit was 'n besef--'n waarheid. 'n Man")
|
|
96
|
+
assert_equal "the letter ‘n’ and ‘no’", Sterile.smart_format("the letter 'n' and 'no'")
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def test_smart_format_leaves_three_hyphens
|
|
100
|
+
assert_equal "Go to h---, he said", Sterile.smart_format("Go to h---, he said")
|
|
101
|
+
assert_equal "one—two", Sterile.smart_format("one--two")
|
|
102
|
+
assert_equal "——", Sterile.smart_format("----")
|
|
103
|
+
assert_equal "——-", Sterile.smart_format("-----")
|
|
104
|
+
assert_equal "———", Sterile.smart_format("------")
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def test_smart_format_tags_quotes_around_tags
|
|
108
|
+
assert_equal "“<em>Word</em>” and ‘<em>Word</em>’", Sterile.smart_format_tags(%q{"<em>Word</em>" and '<em>Word</em>'})
|
|
109
|
+
assert_equal "<em>“Word”</em> and <em>‘Word’</em>", Sterile.smart_format_tags(%q{<em>"Word"</em> and <em>'Word'</em>})
|
|
110
|
+
assert_equal "He said, “<em>Go</em>.” Then “<em>stop</em>,” he said.", Sterile.smart_format_tags(%q{He said, "<em>Go</em>." Then "<em>stop</em>," he said.})
|
|
111
|
+
assert_equal "“<em>A</em>” “<b><em>B</em></b>” (“<em>C</em>”)", Sterile.smart_format_tags(%q{"<em>A</em>" "<b><em>B</em></b>" ("<em>C</em>")})
|
|
112
|
+
assert_equal "<em>Dan.</em> ‘And then’", Sterile.smart_format_tags(%q{<em>Dan. </em>'And then'})
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def test_smart_format_tags_apostrophe_across_tags
|
|
116
|
+
assert_equal "<em>Bible</em>’s and <em>Bibles</em>’ covers", Sterile.smart_format_tags(%q{<em>Bible</em>'s and <em>Bibles</em>' covers})
|
|
117
|
+
assert_equal "Armstrong<span>’s footsteps</span>", Sterile.smart_format_tags(%q{Armstrong<span>'s footsteps</span>})
|
|
118
|
+
assert_equal "<span>GM</span><em>’s</em> top", Sterile.smart_format_tags(%q{<span>GM</span><em>'s</em> top})
|
|
119
|
+
assert_equal "don<em>’t</em>", Sterile.smart_format_tags(%q{don<em>'t</em>})
|
|
120
|
+
assert_equal "described as ‘<em>standing</em>’ there", Sterile.smart_format_tags(%q{described as '<em>standing</em>' there})
|
|
121
|
+
assert_equal "<em>Youth ’81</em> magazine", Sterile.smart_format_tags(%q{<em>Youth '81</em> magazine})
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def test_smart_format_tags_quote_after_dash_across_tags
|
|
125
|
+
assert_equal "word—“<em>Quote</em>”—word", Sterile.smart_format_tags(%q{word--"<em>Quote</em>"--word})
|
|
126
|
+
assert_equal "<em>Doe v. Bolton—</em>“viability” was", Sterile.smart_format_tags(%q{<em>Doe v. Bolton--</em>"viability" was})
|
|
127
|
+
assert_equal "<em>word</em>—“quote”", Sterile.smart_format_tags(%q{<em>word</em>—"quote"})
|
|
128
|
+
assert_equal "“<em>Wait—</em>” he said", Sterile.smart_format_tags(%q{"<em>Wait--</em>" he said})
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def test_smart_format_tags_starts_over_in_each_block
|
|
132
|
+
assert_equal "<p>one</p><p>‘two’</p>", Sterile.smart_format_tags(%q{<p>one</p><p>'two'</p>})
|
|
133
|
+
assert_equal "<p>one</p>“two”", Sterile.smart_format_tags(%q{<p>one</p>"two"})
|
|
134
|
+
assert_equal "<p>one<br>“two”</p>", Sterile.smart_format_tags(%q{<p>one<br>"two"</p>})
|
|
135
|
+
assert_equal "<figure>one</figure>“two”", Sterile.smart_format_tags(%q{<figure>one</figure>"two"})
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def test_smart_format_tags_reads_on_through_unknown_tags
|
|
139
|
+
assert_equal "“one<uppercase>!</uppercase>”", Sterile.smart_format_tags(%q{"one<uppercase>!</uppercase>"})
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def test_smart_format_tags_lists
|
|
143
|
+
assert_equal "<ul>\n<li>one</li>\n<li>“two”</li>\n</ul>", Sterile.smart_format_tags(%q{<ul><li>one</li><li>"two"</li></ul>}).gsub(" ", "\n")
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def test_smart_format_tags_leaves_markup_alone
|
|
147
|
+
assert_equal %q{<a href="a--b?x=1&y=2" title="it's">it’s “x”—y</a>}, Sterile.smart_format_tags(%q{<a href="a--b?x=1&y=2" title="it's">it's "x"--y</a>})
|
|
148
|
+
assert_equal "AT&T <b> 2×4 <em>x</em>", Sterile.smart_format_tags("AT&T <b> 2x4 <em>x</em>")
|
|
149
|
+
assert_equal "wait… <em>(c) 2020</em> (<em>tm</em>)", Sterile.smart_format_tags("wait... <em>(c) 2020</em> (<em>tm</em>)").sub("©", "(c)")
|
|
60
150
|
end
|
|
61
151
|
|
|
62
152
|
def test_sterilize
|
|
@@ -94,5 +184,29 @@ class TestSterile < Minitest::Test
|
|
|
94
184
|
assert_equal "“War in ’24”", Sterile.smart_format("\"War in '24\"")
|
|
95
185
|
end
|
|
96
186
|
|
|
187
|
+
def test_copyright_symbol
|
|
188
|
+
assert_equal "© 2016 PCG", Sterile.smart_format("(c) 2016 PCG")
|
|
189
|
+
assert_equal "©2016", Sterile.smart_format("(c)2016")
|
|
190
|
+
assert_equal "© 2016", Sterile.smart_format("(C) 2016")
|
|
191
|
+
assert_equal "Copyright © PCG", Sterile.smart_format("Copyright (c) PCG")
|
|
192
|
+
assert_equal "copyright © PCG", Sterile.smart_format("copyright (C) PCG")
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def test_enumerated_c_is_not_copyright
|
|
196
|
+
s = "(a) a king, (b) people, within (c) a territory, with (d) laws"
|
|
197
|
+
assert_equal s, Sterile.smart_format(s)
|
|
198
|
+
assert_equal "(c) the third point", Sterile.smart_format("(c) the third point")
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def test_registered_symbol
|
|
202
|
+
assert_equal "Acme® widgets", Sterile.smart_format("Acme(r) widgets")
|
|
203
|
+
assert_equal "Acme®", Sterile.smart_format("Acme(R)")
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
def test_enumerated_r_is_not_registered
|
|
207
|
+
s = "(q) one, (r) two"
|
|
208
|
+
assert_equal s, Sterile.smart_format(s)
|
|
209
|
+
end
|
|
210
|
+
|
|
97
211
|
end
|
|
98
212
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sterile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patrick Hogan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '0'
|
|
84
84
|
requirements: []
|
|
85
|
-
rubygems_version: 3.
|
|
85
|
+
rubygems_version: 3.4.19
|
|
86
86
|
signing_key:
|
|
87
87
|
specification_version: 4
|
|
88
88
|
summary: Sterilize your strings! Transliterate, generate slugs, smart format, strip
|