2007-07-04, 11:29 AM
Check this out:
Now what I want in the above list is line-break between "Some description here" and Item 2. However, I cannot accomplish it with unless I use some character on the next line (not space).
This works as I want, but with addition of that "dot".
I have noticed it again and again now and would like to have the functionality of being able to add new line breaks within the items of a list.
Personally, I have the following workaround. In class_parser.php, find:
Replace with:
Now that preserves the spacing.
Let's analyze the resulting html. By default, the following HTML is created:
After using the modified regex, the following is created:
Well, if a user is pressing enter key twice, and leaving 2 line-breaks in there, that's probably done on purpose... So why not allow them to have multiple line-breaks?
I was writing few articles, and they had few questions in the list format, however, it looked pretty ugly because of the line-breaks issues.
- Item 1
Some description here.
- Item 2
More description here.
Now what I want in the above list is line-break between "Some description here" and Item 2. However, I cannot accomplish it with unless I use some character on the next line (not space).
This works as I want, but with addition of that "dot".
- Item 1
Some description here.
.
- Item 2
More description here.
I have noticed it again and again now and would like to have the functionality of being able to add new line breaks within the items of a list.
Personally, I have the following workaround. In class_parser.php, find:
$message = preg_replace("#\s*\[\*\]\s*#", "</li>\n<li>", $message);
Replace with:
$message = preg_replace("#\[\*\]#", "</li>\n<li>", $message);
Now that preserves the spacing.
Let's analyze the resulting html. By default, the following HTML is created:
<ol type="1">
<li>Item 1<br />
Some description here.</li>
<li>Item 2<br />
More description here.<br />
</li></ol>
After using the modified regex, the following is created:
<ol type="1">
<li>Item 1<br />
Some description here.<br />
<br />
</li>
<li>Item 2<br />
More description here.<br />
</li></ol>
Well, if a user is pressing enter key twice, and leaving 2 line-breaks in there, that's probably done on purpose... So why not allow them to have multiple line-breaks?
I was writing few articles, and they had few questions in the list format, however, it looked pretty ugly because of the line-breaks issues.