Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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