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

Added option to increase heading level of transcluded files #10

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

Conversation

cncastillo
Copy link

@cncastillo cncastillo commented Jun 26, 2024

Sometimes if you have a note.md

# Abstract
...
# Introduction
...
# Chapter 1
[[chapter1.md]]

and chapter1.md

# Abstract
...
# Introduction
...
# Methods
...

You want to include the chapter increasing the heading levels by one, so note.baked.md

# Abstract
...
# Introduction
...
# Chapter 1
## Abstract
...
## Introduction
...
## Methods
...

This pull request accomplishes that, and adds a command bake-file:saved-settings using the new API.

Nevertheless, I am not sure if this is the best place to call the new incrementHeadings function (bake.ts):

    // Recurse and bake the linked file...
    const baked = incrementHeadings(sanitizeBakedContent(
      await bake(app, linkedFile, subpath, newAncestors, settings)
    ), settings.incrementHeadingLevels);

Related to #8.

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