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
|
end
|
||||||
|
|
||||||
function strip_header(chunk::DocChunk)
|
function strip_header(chunk::DocChunk)
|
||||||
|
if ismatch(r"^---$(?<header>.+)^---$"ms, chunk.content)
|
||||||
chunk.content = lstrip(replace(chunk.content, r"^---$(?<header>.+)^---$"ms, ""))
|
chunk.content = lstrip(replace(chunk.content, r"^---$(?<header>.+)^---$"ms, ""))
|
||||||
|
end
|
||||||
return chunk
|
return chunk
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
~~~~{.julia}
|
~~~~{.julia}
|
||||||
using DataFrames
|
using DataFrames
|
||||||
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
\begin{juliacode}
|
\begin{juliacode}
|
||||||
using DataFrames
|
using DataFrames
|
||||||
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
df = DataFrame(letters = 'a':'z', numbers = 1:26)
|
||||||
|
|
Loading…
Reference in New Issue