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

I run in a file.markdown unsuccessfully

source ./table.html

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

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

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.

link|improve this answer
1  
Your script seems to put the table inside the file in .markdown -format. – Masi Jul 24 '09 at 19:10
.markdown accepts inline HTML. What is the problem? – jamuraa Jul 24 '09 at 19:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.