Home » Questions » Computers [ Ask a new question ]

How can you source in a file of .markdown -format?

How can you source in a file of .markdown -format?

I have a file which needs many tables in html. I have the tables in separate files.

Asked by: Guest | Views: 72
Total answers/comments: 1
Guest [Entry]

"According to the markdown syntax, there isn't a tool within markdown to do what you want.

Usually if you want to do this, you can create a small script to put the tables into the markdown where you want with a replacement of a token in the markdown text. You can do this in for example bash script by this:

#!/bin/bash

cat testfile | (
while read i; do
if [ ""$i"" == ""##TABLESAREHERE##"" ]; then
cat table_file
else
echo $i
fi
done
)

when you run your script, it will then generate the final markdown which will be used."