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

[FR] Do it for H3, H4, ... #7

Open
bonnebulle opened this issue Jul 5, 2023 · 4 comments
Open

[FR] Do it for H3, H4, ... #7

bonnebulle opened this issue Jul 5, 2023 · 4 comments

Comments

@bonnebulle
Copy link

Hey, thanks
This make my work more effective/fluid !
Am using it like https://nullboard.io/preview
Less than a Todo organiser, more for moving parts in long text writting process.
So,
I would like to do it with all sub-titles
This an easy feature you can imagine on futur versions ?
Moving not only H1/H2 parts should realy help.
Thanks, amazing tool

@bonnebulle
Copy link
Author

Some one here ?
Do it for h3/h4/h5/h6 can make it very much usesull !
Thanks, great tool

@bonnebulle
Copy link
Author

I imagine it not only by changing 2 by 3 or 4 in boardEditor.ts
href = href.split('#', 2)[0].split('?', 2)[0]; // remove query string or fragment
It is ? Thanks again

@brokensandals
Copy link
Owner

Hey, sorry for not replying earlier. I'm not personally using this project right now, so maintaining it isn't a priority and I can't make any promises about if/when I'll address this feature request. If you'd like to try to make the change in your own fork of the project, I think this is the part of the code you need to look at:

switch (match[1]) {
case '#':
if (h1) {
h1.end = match.index;
}
h1 = { start: match.index, end: 0, index: h1index, heading: match[2], children: [] };
parseSectionHeading(h1);
h1index += 1;
h2index = 0;
h2 = null;
root.children.push(h1);
break;
case '##':
if (h1) {
h2 = { start: match.index, end: 0, index: h2index, heading: match[2], children: [] };
parseSectionHeading(h2);
h2index += 1;
h1.children.push(h2);
}
break;
}
- the case '#' line is handling h1 and the case '##' line is handling h2. The split line that you linked above is unrelated to headings, it's for parsing hyperlinks.

@bonnebulle
Copy link
Author

bonnebulle commented Dec 19, 2023

Yep, I totally understand, thanks for your answer.
Like you see, I am a total noob (no so much js/vsc skills)
Thanks, I will start searching for tutorials ;)

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

2 participants