-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolves #185 autofit font size in listing & literal blocks
- autofit (reduce font size) to prevent wrapping in listing & literal blocks - prevent font size from being reduced more than *_font_size_min - activate autofit if autofit option is specified on block - activate autofit if autofit-option attribute is specified on document - add autofit example to chronicles.adoc - add additional helper methods to core_ext and sanitizer
- Loading branch information
1 parent
b27e700
commit 3e3fa7b
Showing
8 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require_relative 'core_ext/array' | ||
require_relative 'core_ext/numeric' | ||
#require_relative 'core_ext/ostruct' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
class Array | ||
def to_h | ||
Hash[to_a] | ||
end unless respond_to? :to_h | ||
end if RUBY_VERSION < '2.1.0' | ||
if RUBY_VERSION < '2.1.0' | ||
def to_h | ||
Hash[to_a] | ||
end unless respond_to? :to_h | ||
end | ||
|
||
def delete_all *entries | ||
entries.map {|entry| delete entry }.compact | ||
end unless respond_to? :delete_all | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Numeric | ||
def with_precision precision | ||
precision = precision.to_i | ||
if precision > 0 | ||
factor = 10 ** precision | ||
(self * factor).truncate / factor.to_f | ||
else | ||
self.truncate | ||
end | ||
end unless respond_to? :with_precision | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters