bashup / mdsh

Multi-lingual, Markdown-based Literate Programming... in run-anywhere bash
MIT License
185 stars 15 forks source link

Enable code beeing compiled within blockquotes or lists #8

Closed BitFis closed 4 years ago

BitFis commented 4 years ago

resolve #7

pjeby commented 4 years ago

Per my comment on #7, the existing behavior is as intended and designed: a feature, not a bug. Projects that need specialized parsing can always replace the mdsh-parse function with a custom one. For example, here is an mdsh extension script that does so:

#!/usr/bin/env bash

source mdsh

mdsh-parse() {
    # custom parser here
}

if [[ $0 == "$BASH_SOURCE" ]]; then mdsh-main "$@"; fi

This script will function the same as mdsh, just using a customized parser.