unordered/ordered list not working for selected text

17 views
Skip to first unread message

izaac

unread,
Dec 27, 2011, 6:54:54 PM12/27/11
to Nested
hello,

I'm testing nested in opensuse/fedora and i just found something
weird: selected lines of text are not getting listed like for
instance:

first
second
third
fourth

after selection and click on unordered list i got the following
result:


- first
second
third
fourth

Thanks in advance

Carlos Jenkins

unread,
Dec 28, 2011, 4:32:10 PM12/28/11
to nested...@googlegroups.com
Hi Izaac.

That is the current programmed list button behavior, but your are right it not the expected or the better we can have.

As you have noticed, the rules for a list is:

1. Line must start with a hyphen o a plus sign (-, +, unordered list, ordered list)  
2. A sub list must be indented with a white space per level.
3. A empty list item or two spaces closes the list.

So, given those rules, what would be the expected behavior of the list button?

If no text is selected:
  If cursor is not in the first line:
    Insert a newline
  Insert a hyphen (plus sign) in front of the line, then go to the end of that line and then insert two newlines?
Else, if text is selected:
  If cursor is not in the first line:
    Insert a newline
  Split the text (newlines), that is, get the lines separated.
  For each line, append a hyphen in front of them
  Insert two newlines.

Text is very variable a volatile, so I'm always having problems to identify what would be the best behavior of a particular formatting option, because they are a lot of possible cases.

So, what do you think?

Kind regards

izaac

unread,
Dec 28, 2011, 8:43:03 PM12/28/11
to Nested
Oh, one of the first things that interested me on this app was the
support for us to easily handle the markup language, so by stating
this I mean I'm not that skilled on using a markup language so is
difficult to me on making such decision.

I was checking other editors to build me a better perspective and it
is the exact same behavior, so I believe that's the way to go.

Thanks for the quick response.

Carlos Jenkins

unread,
Dec 30, 2011, 2:40:41 AM12/30/11
to nested...@googlegroups.com
Hi,

El 28 de diciembre de 2011 19:43, izaac <jorge...@gmail.com> escribió:
Oh, one of the first things that interested me on this app was the
support for us to easily handle the markup language,
Yes, that is the idea.
 
so by stating this I mean I'm not that skilled on using a markup language so is
difficult to me on making such decision.
Ok, but you have already stated what would be the expected behavior of the button and I'm changing 
it accordingly. On any case the button will never offer all the posibilities so it's important to learn the markup:


The markup used by Nested (called txt2tags) is quite natural and simple but it obey specific rules.

I was checking other editors to build me a better perspective and it
is the exact same behavior, so I believe that's the way to go.
But I like your idea on adding a hyphen/plus sign to the beginning of all the selected lines. I'll implement it and test it.

Carlos Jenkins

unread,
Jan 2, 2012, 5:05:07 PM1/2/12
to nested...@googlegroups.com
Hi,

I've implemented the expected behavior of the list buttons an is working great. It will be available in the next release.
Reply all
Reply to author
Forward
0 new messages