fix when a header value is not `String`

pull/334/head
Shuhei Kadowaki 2020-05-16 23:45:41 +09:00
parent f86f5a7bd0
commit e60f066d31
1 changed files with 3 additions and 2 deletions

View File

@ -493,8 +493,9 @@ replace_header_inline!(doc, report, mod) = _replace_header_inline!(doc, doc.head
function _replace_header_inline!(doc, header, report, mod)
replace!(header) do (k,v)
return k => v isa Dict ?
_replace_header_inline!(doc, v, report, mod) :
return k =>
v isa Dict ? _replace_header_inline!(doc, v, report, mod) :
!isa(v, AbstractString) ? v :
replace(v, HEADER_INLINE => s -> begin
m = match(HEADER_INLINE, s)
run_inline_code(m[:code], doc, report, mod)