Is linewrap dead?
Cameron Simpson
cs at cskk.id.au
Mon Sep 5 01:19:24 UTC 2022
On 05Sep2022 08:37, raf via Mutt-users <mutt-users at mutt.org> wrote:
>> > I like your indenting of code blocks, but it seems to
>> > put an additional blank line after each code block.
>> > That might not be intentional.
>>
>> Not intentional. I just wanted to keep the 4 space indent used to trigger a
>> code block for the same visual effect, since I use that instead of the
>> triple backticks usually. Pandoc tosses those spaces.
>
>That's correct behaviour for markdown.
Doesn't mean I like it :-)
>If you want the
>output to be indented four spaces, the markdown source
>needs to be indented eight spaces. But for email use,
>it's a nice idea to do what you're doing.
I'd like the HTML to resemble the source MarkDown, visually.
>If you want to prevent the extra line, the sed command
>can be changed to remove theindenyt before the closing
>line of the code block:
>
> sed '
> s/^\(<pre><code>\)\(.*<\/code><\/pre>\)$/\1 \2/
> t post_pre_code
> /^<pre><code>/,/<\/code><\/pre>$/{
> s/^/ /
> s/^ \(<pre><code>\)/\1 /
> s/^ \(<\/code><\/pre>\)/\1/
> }
> :post_pre_code
> '
Ah, right. Thanks.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Mutt-users
mailing list