marsmining / ox-twbs

Export org-mode docs as HTML compatible with Twitter Bootstrap.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fixed-width element adds unneccesary newline

felix11h opened this issue · comments

Given Org-mode text

Inline code test, some more words, then some code
: hello world
and text again. Shouldn't make two lines, but it does!

I do not expect the exported html to add an additional line to the fixed-width : block:

output

Can anyone confirm this behaviour or is it specific to my settings?

I believe that the relevant code in ox-twbs.el is

(defun org-twbs-fixed-width (fixed-width contents info)
  "Transcode a FIXED-WIDTH element from Org to HTML.
CONTENTS is nil.  INFO is a plist holding contextual information."
  (format "<pre class=\"example\">\n%s</pre>"
          (org-twbs-do-format-code
           (org-remove-indentation
            (org-element-property :value fixed-width)))))

I would be happy to prepare a pull-request, but I might need some pointers on how to best tackle the problem. Thank you!

Thanks for reporting! That does seem annoying. I'll take a look this weekend.

Realized that this is still open. Thank you very much for implementing a fix for this. Works like a charm!