summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-09-13 15:21:07 -0600
committerDan Allen <dan.j.allen@gmail.com>2019-09-13 15:21:31 -0600
commita3073b17ccb91f8eef6939500235b2dc0db4ac3c (patch)
tree531d64521c1012575de3e70edb77034c419bc326
parente78d7c1a5f877dc3a3a1d0efcac5479f6e93cb8d (diff)
allow comma to be used as alternative delimiter to separate multiple font dirs
-rw-r--r--lib/asciidoctor-pdf/converter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asciidoctor-pdf/converter.rb b/lib/asciidoctor-pdf/converter.rb
index 2144d274..ef0b44ab 100644
--- a/lib/asciidoctor-pdf/converter.rb
+++ b/lib/asciidoctor-pdf/converter.rb
@@ -103,6 +103,7 @@ class Converter < ::Prawn::Document
BlankLineRx = /\n{2,}/
CjkLineBreakRx = /(?=[\u3000\u30a0-\u30ff\u3040-\u309f\p{Han}\uff00-\uffef])/
WhitespaceChars = ' ' + TAB + LF
+ ValueSeparatorRx = /;|,/
SourceHighlighters = ['coderay', 'pygments', 'rouge'].to_set
PygmentsBgColorRx = /^\.highlight +{ *background: *#([^;]+);/
ViewportWidth = ::Module.new
@@ -3330,7 +3331,7 @@ class Converter < ::Prawn::Document
def register_fonts font_catalog, fonts_dir
return unless font_catalog
- dirs = (fonts_dir.split ';', -1).map do |dir|
+ dirs = (fonts_dir.split ValueSeparatorRx, -1).map do |dir|
dir == 'GEM_FONTS_DIR' || dir.empty? ? ThemeLoader::FontsDir : dir
end
font_catalog.each do |key, styles|