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

Method to get separated content without [toc] tag #22

Open
codekandis opened this issue Nov 24, 2021 · 0 comments
Open

Method to get separated content without [toc] tag #22

codekandis opened this issue Nov 24, 2021 · 0 comments

Comments

@codekandis
Copy link

codekandis commented Nov 24, 2021

It would be a very nice feature to retreive the body separately with a different method.

example.md

# FooBar

`FooBar` is a library to ...

[toc]

## Installation

Do some weird stuff right now.

ParsedownToC::getBodyOnly()

<h1 id="FooBar" name="FooBar">FooBar</h1>
<p><code>FooBar</code> is a library to ...</p>
<h2 id="Installation" name="Installation">Installation</h2>
<p>Do some weird stuff right now.</p>

The purpose behind this is, e. g., to place the TOC in a different HTML section in the target document of an application and to omit the [toc] tag in the body. Currently ParsedownToC:body() is showing the [toc] tag unparsed / unreplaced.

@codekandis codekandis changed the title Method to get content without toc-tag Method to get separated toc and content Nov 24, 2021
@codekandis codekandis changed the title Method to get separated toc and content Methods to get separated TOC and content Nov 24, 2021
@codekandis codekandis changed the title Methods to get separated TOC and content Method to get separated content without [toc] tag Nov 24, 2021
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

1 participant