Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outline not in document order #114

Closed
jbuhacoff opened this issue Sep 1, 2016 · 5 comments
Closed

outline not in document order #114

jbuhacoff opened this issue Sep 1, 2016 · 5 comments

Comments

@jbuhacoff
Copy link

Has anyone else noticed this? I have Netbeans 8.1

Let's say my document headings are (in order): A, A.1, A.2, B, B.1, B.2, C

In the Navigator, they might appear out of order, for example A, A.1, A.2, C, B, B.1, B.2

Seems that C would never get mixed in between A.1 and A.2, but among other headings at the same level they can be out of order.

Closing and reopening the document, quitting netbeans and restarting, seems to have no effect on this.

I have long markdown documents with a lot of headings, its quite troublesome to not find things in the outline where I expect them to be.

@junichi11
Copy link
Collaborator

I cannot reproduce it. Can you write reproducible code here?

nb-markdown-issue114

@stengerh
Copy link
Collaborator

stengerh commented Sep 6, 2016

Same here. A minimal example which demonstrates this issue would be very useful.

@jbuhacoff
Copy link
Author

Here is an example document:

`

Heading 1

Heading 1.1

Heading A

Heading B

Heading C

Heading D

Heading E

Heading F

Heading G

Heading H

Heading I

Heading J

Heading K

Heading L

Heading M

`
image

@junichi11
Copy link
Collaborator

@jbuhacoff Thanks! It's reproducible. Probably, @stengerh can fix it ;)

@stengerh
Copy link
Collaborator

Thank you for the example. The problem occurs whenever there are more than nine headings at the same level. The navigator view requires the plugin to provide a sort key as string. The generated sort keys look like "1.1.1", "1.1.10" or "1.1.2", and they are compared lexicographically. I will prepare a suitable fix.

stengerh added a commit that referenced this issue Oct 17, 2016
@madflow madflow closed this as completed Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants