emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org2blog 20230501.2319 from melpa gets strange formatting on diff of HTML file
@ 2024-09-22 21:40 Steinar Bang
  0 siblings, 0 replies; only message in thread
From: Steinar Bang @ 2024-09-22 21:40 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-22 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 21:40 org2blog 20230501.2319 from melpa gets strange formatting on diff of HTML file Steinar Bang

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).