Different preprocessor based on file extension

jmay's Avatar

jmay

31 Jan, 2014 07:37 PM

I used Marked to preview files with different extensions.

I want to use a different pre-processor script on the file, depending on the extension.

But the processor scripts use stdin/stdout, so I don't have a filename to inspect. Is it available somewhere?

-Jason

  1. Support Staff 1 Posted by Brett on 31 Jan, 2014 07:43 PM

    Brett's Avatar

    It's in an environment variable called MARKED_EXT.

    -Brett

  2. 2 Posted by jmay on 31 Jan, 2014 07:59 PM

    jmay's Avatar

    Awesome. That worked perfectly. Thanks!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac