* [ox-html, patch] trim contents on list-items
@ 2014-12-16 12:56 Rasmus
2014-12-20 21:52 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2014-12-16 12:56 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
Hi,
I use CSS to make inlined lists in html:
#text-sec ul {margin: 0; padding: 0; list-style: none;}
#text-sec li {display: inline;}
#text-sec li:after {content: ", ";}
#text-sec li:last-child:after {content: "";}
However, since (list-)items are formatted like
<li>whatever
</li>
CSS adds a spurious space in front of my comma... Anybody feel strongly
in favor of keeping this newline? Or can I push this patch?
—Rasmus
--
C is for Cookie
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-html.el-Trim-list-items.patch --]
[-- Type: text/x-diff, Size: 761 bytes --]
From c990d10b6a649e169ad6bfae61063b597d735771 Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Tue, 16 Dec 2014 13:49:08 +0100
Subject: [PATCH] ox-html.el: Trim list items
* ox-html.el (org-html-format-list-item): Trim contents to avoid
spurious space.
---
lisp/ox-html.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 178642d..82073dd 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2508,7 +2508,7 @@ INFO is a plist holding contextual information. See
class (concat checkbox term))
"<dd>"))))
(unless (eq type 'descriptive) checkbox)
- contents
+ (org-trim contents)
(case type
(ordered "</li>")
(unordered "</li>")
--
2.1.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [ox-html, patch] trim contents on list-items
2014-12-16 12:56 [ox-html, patch] trim contents on list-items Rasmus
@ 2014-12-20 21:52 ` Nicolas Goaziou
2014-12-21 0:21 ` Rasmus
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2014-12-20 21:52 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Hello,
Rasmus <rasmus@gmx.us> writes:
> I use CSS to make inlined lists in html:
>
> #text-sec ul {margin: 0; padding: 0; list-style: none;}
> #text-sec li {display: inline;}
> #text-sec li:after {content: ", ";}
> #text-sec li:last-child:after {content: "";}
>
> However, since (list-)items are formatted like
>
> <li>whatever
> </li>
>
> CSS adds a spurious space in front of my comma... Anybody feel strongly
> in favor of keeping this newline? Or can I push this patch?
FWIW, I think you can apply it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ox-html, patch] trim contents on list-items
2014-12-20 21:52 ` Nicolas Goaziou
@ 2014-12-21 0:21 ` Rasmus
0 siblings, 0 replies; 3+ messages in thread
From: Rasmus @ 2014-12-21 0:21 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> I use CSS to make inlined lists in html:
>>
>> #text-sec ul {margin: 0; padding: 0; list-style: none;}
>> #text-sec li {display: inline;}
>> #text-sec li:after {content: ", ";}
>> #text-sec li:last-child:after {content: "";}
>>
>> However, since (list-)items are formatted like
>>
>> <li>whatever
>> </li>
>>
>> CSS adds a spurious space in front of my comma... Anybody feel strongly
>> in favor of keeping this newline? Or can I push this patch?
>
> FWIW, I think you can apply it.
Pushed. Thanks.
--
When in doubt, do it!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-21 0:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 12:56 [ox-html, patch] trim contents on list-items Rasmus
2014-12-20 21:52 ` Nicolas Goaziou
2014-12-21 0:21 ` Rasmus
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).