#set smartquote(enabled: false)
#show sym.dash.en: "--"
#show sym.dash.em: "---"
#show quote.where(block: true): it => {
let attribution = if it.attribution != none {
align(end, [--- #it.attribution])
}
block(
inset: 1em,
width: 100%,
if it.quotes == true [
"#it.body"
#attribution
] else [
#it.body
#attribution
]
)
}
// --
#strong[Test 1]
Lorem ipsum --- dolor "sit" amet.
#strong[Test 2]
#quote(attribution: "John Doe", block: true)[
Lorem ipsum dolor sit amet.
]
#strong[Test 3]
#quote(attribution: "John Doe", block: true, quotes: true)[
Lorem ipsum dolor sit amet.
]
The example above is my attempt to disable typographic substitutions.
It almost works, but there is one minor issue: as you can see from the output of Test 3, there are excessive space characters near quotation marks:
" Lorem ipsum dolor sit amet. "
--- John Doe
How to get rid of them? My guess is that the line
"#it.body"
should be changed to something like
#regex("(\")\n+", $1)#it.body#regex("\n+(\")", $1)
but I haven’t succeeded to make it work.