ignoring blank lines around headings

0 views
Skip to first unread message

FND

unread,
May 20, 2007, 4:16:26 AM5/20/07
to Tiddly...@googlegroups.com
Hey all,

Here's an issue that's been bugging me for a while:
In order to enhance readability of the tiddler source (wiki markup), I
like to add blank lines in front and after headings, like so:

!Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

!Ut Enim

Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur.

Unfortunately, this will add some unwanted blank space (apparently
through BR elements) in the output as well.
Of course this could be remedied with CSS styling (negative margins on
the headings). However, that feels like a dirty hack, and it would raise
issues if those blank lines were omitted (e.g. in tiddlers with less
content).

Would it be hard to make the TW parser ignore such blank lines around
headings? I've tried playing around with the respective RegEx
("^!{1,6}"), but apparently it's not quite that easy...
Also, would this even be desirable (I might be the only who thinks this
would be a very helpful thing)?


-- F.

Daniel Baird

unread,
May 20, 2007, 4:48:08 AM5/20/07
to Tiddly...@googlegroups.com
I agree that headings should eat one newline before and one after
(which I guess is really two after, seeing as the heading ends with a
newline of it's own).

I think it should only eat one in each direction though, so you can
still add extra spaces if you want.

;Daniel


--
Daniel Baird
http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things That Suck)

lewcid

unread,
May 20, 2007, 8:22:01 AM5/20/07
to TiddlyWikiDev
I remember some discussion on this a while back. I believe the
consensus was to tackle it when proper support for paragraphs was
added.

FND

unread,
May 20, 2007, 11:18:42 AM5/20/07
to Tiddly...@googlegroups.com
> I remember some discussion on this a while back. I believe the
> consensus was to tackle it when proper support for paragraphs was
> added.

Good to know! I'll wait for TW 2.3+ then.
(I couldn't find a ticket on this though; might be worth creating one!?)


-- F.

FND

unread,
May 22, 2007, 12:01:35 PM5/22/07
to Tiddly...@googlegroups.com
> (I couldn't find a ticket on this though; might be worth creating one!?)

I just noticed I myself can't create tickets (anymore), which is fine.
Could someone else please do that?

By the way: This issue not only applies to headings, but also to lists,
blockquotes etc.


-- F.

Jeremy Ruston

unread,
May 23, 2007, 12:12:24 PM5/23/07
to Tiddly...@googlegroups.com
Sorry, more Trac permission shenanigans. Any registered user should
now be able to create tickets or append comments.

Cheers

Jeremy


--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com

FND

unread,
May 23, 2007, 12:47:01 PM5/23/07
to Tiddly...@googlegroups.com
> Sorry, more Trac permission shenanigans. Any registered user should
> now be able to create tickets or append comments.

Thanks; I've submitted this as ticket #335:
http://trac.tiddlywiki.org/ticket/335


-- F.

Reply all
Reply to author
Forward
0 new messages