all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steinar Bang <sb@dod.no>
To: emacs-orgmode@gnu.org
Subject: org2blog 20230501.2319 from melpa gets strange formatting on diff of HTML file
Date: Sun, 22 Sep 2024 23:40:04 +0200	[thread overview]
Message-ID: <878qvj4bbf.fsf@dod.no> (raw)

Versions: debian 12.7 bookworm, amd64
          GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2024-07-22, modified by Debian
          Org mode version 9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)
          org2blog 20230501.2319 from melpa

I have this code example:
#+begin_src diff
  modified   src/main/resources/index.html
  @@ -5,7 +5,7 @@
       </head>
       <body>
           <div id="root"></div>
  -        <script src="bundle.js" type="application/javascript"></script>
  +        <script src="assets/index.js" type="application/javascript"></script>
           <noscript>This webpage requires javascript in the browser!</noscript>
       </body>
   </html>
#+end_src

In the wordpress blog, this renders as: https://www.bang.priv.no/screenshots/html-diff-with-source.png

First thing I tried was to replace the first "<" on the diff lines, with "&lt;":
#+begin_src diff
  modified   src/main/resources/index.html
  @@ -5,7 +5,7 @@
       </head>
       <body>
           <div id="root"></div>
  -        &lt;script src="bundle.js" type="application/javascript"></script>
  +        &lt;<script src="assets/index.js" type="application/javascript"></script>
           <noscript>This webpage requires javascript in the browser!</noscript>
       </body>
   </html>
#+end_src

But, while stuff didn't disappear in the same way as the first example,
the result wasn't a complete success: https://www.bang.priv.no/screenshots/html-diff-with-amp.png

The next thing I tried was to use an example, instead of a source with
file type diff:
#+begin_example
    modified   src/main/resources/index.html
    @@ -5,7 +5,7 @@
         </head>
         <body>
             <div id="root"></div>
    -        <script src="bundle.js" type="application/javascript"></script>
    +        <script src="assets/index.js" type="application/javascript"></script>
             <noscript>This webpage requires javascript in the browser!</noscript>
         </body>
     </html>
#+end_example

But that failed in yet a different manner: https://www.bang.priv.no/screenshots/html-diff-with-example.png

Can anyone think of a workaround that would let me render the diff in a
sensible way?

org2blog hasn't seen any commits since June 27 2023: https://github.com/org2blog/org2blog/commits/master/

And org2blog doesn't seem to be on melpa anymore.

Does anyone have any knowledge if the development has gone elsewhere?

Thanks!


- Steinar


             reply	other threads:[~2024-09-22 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 21:40 Steinar Bang [this message]
2024-10-12 18:03 ` org2blog 20230501.2319 from melpa gets strange formatting on diff of HTML file Ihor Radchenko

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=878qvj4bbf.fsf@dod.no \
    --to=sb@dod.no \
    --cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.