You can do something like this:
from llama_index.core.node_parser import MarkdownNodeParser
# inherit the MarkdownNodeParser class and overide the method which creates nodes from your content.
class YourMarkdownNodeParser(MarkdownNodeParser):
def get_nodes_from_node(self, node: BaseNode) -> List[TextNode]:
# change this method to fit your needs
# You can find current code for this method here
https://github.com/run-llama/llama_index/blob/69716aed521041ccc8dca49952c4fe168691d66d/llama-index-core/llama_index/core/node_parser/file/markdown.py#L37
# once that is done, Use your Parser from there on.
parser = YourMarkdownNodeParser()
nodes = parser.get_nodes_from_documents(markdown_docs)