public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Hirrolot <hirrolot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Pandoc doesn't insert newlines in <code>
Date: Mon, 6 Jun 2022 04:49:38 +0600	[thread overview]
Message-ID: <CA+g-_mrp_5phaWVXavU6kxiF9VMyb23SxNsxJanSFmvNQhgqXA@mail.gmail.com> (raw)
In-Reply-To: <CA+g-_mopnyL1iDJnSp0br-0-CP1nfb0Co3KhNawL=4Mn+HG7Qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3664 bytes --]

If I am able to just turn off syntax highlighting for some code block, this
would be also fine. However, I can't figure out how to do that.

On Mon, Jun 6, 2022 at 4:48 AM Hirrolot <hirrolot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Unfortunately, specifying an unknown language doesn't work either. E.g.:
>
> ```{.code}
> abracadabra abracadabra
> abracadabra abracadabra
> abracadabra abracadabra
> ```
>
> Outputs something like:
>
> <pre class="code"><code>...</code></pre>
>
> Without newlines. However, if I change `code` to e.g. `haskell`, the
> output would be:
>
> <div class="sourceCode">
> <pre class="sourceCode haskell">
> <code class="sourceCode haskell">...</code>
> </pre>
> </div>
>
> This includes newlines.
>
>
> On Sun, Jun 5, 2022 at 11:35 PM BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Try to use `code` as a "language" (actually a class) on your code blocks,
>> or something else which is unlikely to ever become the name of a
>> highlighted language. Pandoc will make it a class on the HTML code tag but
>> will otherwise ignore it.
>>
>> The details about attributes on code blocks are at
>>
>> https://pandoc.org/MANUAL.html#extension-fenced_code_attributes
>>
>> Den sön 5 juni 2022 06:41Hirrolot <hirrolot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> I use Pandoc to convert MD files to HTML. Inside MD, I use this:
>>>
>>> ```
>>> abracadabra abracadabra
>>> abracadabra abracadabra
>>> abracadabra abracadabra
>>> ```
>>>
>>> (In reality, the lines are much longer.)
>>>
>>> Then I style my HTML using CSS and want to add horizontal scrolling.
>>> Specifying a language for the code block works fine because Pandoc
>>> automatically inserts newlines I guess. But if the code block is without a
>>> language (such as the one above), my final code block in HTML just wraps as
>>> ordinary text and I can't fix it.
>>>
>>> I tried --wrap=preserve but with no effect. Any ideas?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "pandoc-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/8efdb324-3ae6-4e63-b653-527984b5a133n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/8efdb324-3ae6-4e63-b653-527984b5a133n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhCFdpRYJwsnF2TPuiemgTeKcmSU7yCXxSxwDtvP4Y5Adg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhCFdpRYJwsnF2TPuiemgTeKcmSU7yCXxSxwDtvP4Y5Adg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bg-_mrp_5phaWVXavU6kxiF9VMyb23SxNsxJanSFmvNQhgqXA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5655 bytes --]

  parent reply	other threads:[~2022-06-05 22:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05  4:40 Hirrolot
     [not found] ` <8efdb324-3ae6-4e63-b653-527984b5a133n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-06-05 17:35   ` BPJ
     [not found]     ` <CADAJKhCFdpRYJwsnF2TPuiemgTeKcmSU7yCXxSxwDtvP4Y5Adg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-05 22:48       ` Hirrolot
     [not found]         ` <CA+g-_mopnyL1iDJnSp0br-0-CP1nfb0Co3KhNawL=4Mn+HG7Qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-05 22:49           ` Hirrolot [this message]
     [not found]             ` <CA+g-_mrp_5phaWVXavU6kxiF9VMyb23SxNsxJanSFmvNQhgqXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-05 22:54               ` Hirrolot
2022-06-06 17:01           ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+g-_mrp_5phaWVXavU6kxiF9VMyb23SxNsxJanSFmvNQhgqXA@mail.gmail.com \
    --to=hirrolot-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).