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

Feature - Implement md::outer_block_content_or_raw(content) #11

Open
jeremychone opened this issue Oct 10, 2024 · 0 comments
Open

Feature - Implement md::outer_block_content_or_raw(content) #11

jeremychone opened this issue Oct 10, 2024 · 0 comments
Labels
enhancement New feature or request FIXED
Milestone

Comments

@jeremychone
Copy link
Owner

jeremychone commented Oct 10, 2024

md::outer_block_content_or_raw(conten)

Without fully parsing the markdown, this function removes the first ``` line and the last one, returning its content.
If no block is found, it returns the raw md_content.

Note: This is useful in the genai context because often LLMs return a top block (e.g., markdown, Rust)
which might have other ``` in the middle but should be interpreted as nested.
(GenAI does not seem to know about the 6 ticks for top level)

@jeremychone jeremychone added the enhancement New feature or request label Oct 10, 2024
@jeremychone jeremychone changed the title Feature - Implement md::first_block_content_or_raw(content) Feature - Implement md::top_block_content_or_raw(content) Oct 12, 2024
@jeremychone jeremychone changed the title Feature - Implement md::top_block_content_or_raw(content) Feature - Implement md::delimited_block_content_or_raw(content) Oct 12, 2024
@jeremychone jeremychone added this to the v0.1.1 milestone Oct 12, 2024
@jeremychone jeremychone changed the title Feature - Implement md::delimited_block_content_or_raw(content) Feature - Implement md::outer_delimited_block_content_or_raw(content) Oct 12, 2024
@jeremychone jeremychone changed the title Feature - Implement md::outer_delimited_block_content_or_raw(content) Feature - Implement md::outer_block_content_or_raw(content) Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FIXED
Projects
None yet
Development

No branches or pull requests

1 participant