Can't we use a custom non/markdown processor?

Sven Axelsson's Avatar

Sven Axelsson

09 Dec, 2011 08:43 AM

I was excited to see that it was possible to use a custom processor in Marked, since I use Asciidoc exclusively and I thought I could use Marked as a nice preview. However it doesn't seem to work. I add the Asciidoc processor like this:

/usr/local/bin/asciidoc -s -

That causes it to read from stdin and generate HTML with only the body text. Should work, right? I also tested putting this in a shell script, in case Marked doesn't like parameters in the command line, but that didn't work either. Is there some pre-parsing of the text going on here to detect that it actually is Markdown? In that case, could we have an option to not do that, please?

  1. Support Staff 1 Posted by Brett on 09 Dec, 2011 02:26 PM

    Brett's Avatar

    You were correct taking the shell script route, Marked can't currently handle command line parameters. Does your shell script pass the input correctly (i.e. `cat|asciidoc -s -`)? If so, and it still doesn't work, please post a sample document here for me and I'll look into it further.

    -Brett

  2. 2 Posted by Sven Axelsson on 09 Dec, 2011 03:11 PM

    Sven Axelsson's Avatar

    Hmm, very strange. Now it works all of a sudden. Don't know why, but I'm happy.

    I'm using this simple shell script wrapper:

    #!/bin/bash
    cat - | /usr/local/bin/asciidoc -s -
    
  3. Support Staff 3 Posted by Brett on 09 Dec, 2011 03:14 PM

    Brett's Avatar

    Glad to hear it :).

    Thanks,
    Brett

Comments are currently closed for this discussion. You can start a new one.

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