@meldscience/meld
Version:
pipeable one-shot prompt scripting toolkit
35 lines (24 loc) • 1.27 kB
Markdown
I want to extend the `meld` tool in this code to also be able to grab a section from any markdown doc or JS/TS object and embed its content in the built output using imports
For markdown imports:
- dumb matching: don’t care how many # in the header level in the doc, just select the first one in the targeted document
- select the content up until the next # header
- skip matching any # inside backtick fences for both startpoints and endpoints
- just error and break the build if a doc or header isn’t found or if multiple matches or some other logical error
## Basic Import from markdown
# Installation]
## Import from markdown with Level Adjustment
# Endpoints] as ###
## Import from markdown with Title Override
# Setup] as ### Quick Start
## import function from code
# myFunction]
## Use braces to export all of x
# {interface}]
# {type}]
# Use brackets to import multiple
# [{interface}, {type}]]
# [myFunction, otherFunction]]
# Path aliases
- defined in a `meldconfig.json` in project root or in `~/.meldrc` globally
# Import from alias
# Installation]