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

Add flag to optionally respect original header indent #2

Open
1 task
ericdorsey opened this issue Mar 1, 2021 · 0 comments
Open
1 task

Add flag to optionally respect original header indent #2

ericdorsey opened this issue Mar 1, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ericdorsey
Copy link
Owner

Say markdownanchormaker finds the following headers:

$ ./markdownanchormaker.py -f /tmp/foo.md
Headings found in /tmp/foo.md:

# Table Of Contents
# Foo Commands
### Foo Help
## Chapter 1: Intro To Foo
### Foo's Cousin Bar
### Foo's Cousin Baz

Add a flag (say -k / --keep-indent?) that respects "subheadings" from the original document, and inserts nbsp;'s into the generated inline links to semi-emulate the subheadings.

So ### Foo Help might become    [Foo Help](#foo-help) -- ie, if number of #'s > 1, add an   for each # (If it's just one # we leave it alone, as it's the biggest header / stays fully flush left)

  • MAYBE: Optionally also allow how much indent per #?..
@ericdorsey ericdorsey self-assigned this Mar 1, 2021
@ericdorsey ericdorsey added the enhancement New feature or request label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant