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 WikiPageRefile functionality #309

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add WikiPageRefile functionality #309

wants to merge 3 commits into from

Conversation

lervag
Copy link
Owner

@lervag lervag commented May 28, 2023

This PR adds a WikiPageRefile command (with mapping) for moving a section from one page to another. This was asked for in #58.

It is not quite ready. The idea is to have the function wiki#page#refile respect the following options:

  • target_file: Move section to target file (use current file if this is not provided)
  • target_lnum: Move section to below specified line number in the target file
  • target_anchor: Move section into the section specified by anchor

Tasks:

  • Allow empty target_file for moving sections within the current file.
  • Allow to specify target_anchor for moving one section into another one.
    • This should automatically adjust the header levels of the refiled section with subsections as appropriate
  • All of the specified features should have good tests
    • Test that bad input gives proper warnings
    • Test that we can move a section within the current document and that it will update links accordingly
    • Test that we can move a section to a specified target section (with target_anchor)

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

Successfully merging this pull request may close these issues.

1 participant