mirror of https://github.com/mpastell/Weave.jl
Preserve whitespace when stripping the header
parent
84dbf05b3e
commit
606bf9147f
|
@ -90,7 +90,9 @@ function get_titleblock(doc::WeaveDoc)
|
|||
end
|
||||
|
||||
function strip_header(chunk::DocChunk)
|
||||
chunk.content = lstrip(replace(chunk.content, r"^---$(?<header>.+)^---$"ms, ""))
|
||||
if ismatch(r"^---$(?<header>.+)^---$"ms, chunk.content)
|
||||
chunk.content = lstrip(replace(chunk.content, r"^---$(?<header>.+)^---$"ms, ""))
|
||||
end
|
||||
return chunk
|
||||
end
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
|
||||
~~~~{.julia}
|
||||
using DataFrames
|
||||
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
|
||||
\begin{juliacode}
|
||||
using DataFrames
|
||||
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
||||
|
|
Loading…
Reference in New Issue