Had a quick look and this piece of code seemed to do the replace:
name: "lineBreak",
match: "\\n|<br ?/?>",
handler: function(w)
{
createTiddlyElement(w.output,"br");
}
Looks like the specific feature searched on is the "\\n" which would be the
newline character to find, so the start/end of paragraph search I thought
was happening, is not :(
So I changed:
*createTiddlyElement(w.output,"**br**"); *
to:
*createTiddlyElement(w.output,"*hr*");*
*
*
Then applied some CSS to the ".viewer hr" as it is specifically where I
want the "hr" tag formatting:
.viewer
hr{border-style:none;padding-bottom:0.25em;color:#fff;background-color:transparent;}
which gave me the desired result of space between paragraphs.
If I want to add a horizontal rule, which I rarely do, I use can use the
following:
.hrule hr{border-bottom:1px solid red;padding-bottom:0.25em; }
with inline use of the class:
{{hrule{
----
}}}
I still would prefer a better solution, but this workaround gets me the
visible result. I haven't seen any issues so far... ;)
On Wednesday, June 12, 2013 10:15:18 AM UTC+10, cflow wrote:
>
> Hi Jeremy,
>
> Was this ever resolved?
> It seems like if it can place <br> in the correct positions then its smart
> enough to find the start of paragraphs and the end of paragraphs already. I
> have read a few of the group pages and anything I can find online but it
> isn't part of the latest TiddlyWiki version.
>
> If its smart enough to find the start and end of paragraphs to place the
> <br> surely it is a minor mod to add the <p> at the start and </p> to the
> end?
>
> What am I missing? If someone can point me to the code that does the
> search for the start/end of paragraphs I will have a crack :)
>
>
> On Monday, May 21, 2007 9:29:27 AM UTC+10, Jeremy Ruston wrote:
>>
>> > Though I guess they'd prefer us donating directly via PayPal
>> > (http://tiddlywiki.com/#Donations) rather than waiting until, someday,
>> > we can come up with 750 quid for "perishable goods"... ;)
>>
>> You're really very kind, and quite right this is a bit of a humdinger.
>> Martin's implementations of the Mediawiki and Socialtext formatters do
>> handle <P> tags correctly thouugh (although I believe there are still
>> some issues in certain edge cases). So I think we're in good shape to
>> solve this; the problem when we do will no doubt be backwards
>> compatibility....
>>
>> Cheers
>>
>> Jeremy
>>
>> >
>> >
>> > -- F.
>> >
>> > >
>> >
>>
>>
>> --
>> Jeremy Ruston
>> mailto:[email protected]
>> http://www.tiddlywiki.com
>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.