rjeschke/txtmark

Configuration setCodeBlockEmitter not working propperly

jdiaz opened this issue · 4 comments

jdiaz commented

Configuration.Builder#setCodeBlockEmitter(BlockEmitter emitter)

Example code:

Configuration.Builder c = Configuration.builder();
c.setCodeBlockEmitter(new CodeBlockEmitter());
c.setAllowSpacesInFencedCodeBlockDelimiters(true);
String res = Processor.process(markdown, c.build());

The configuration does seem to be adding, nor executing the CodeBlockEmitter() class. The code for it is similar to the example code.

The code BlockEmitter is only used for fenced code blocks, please have a look at the README.md for how fenced code blocks work.

jdiaz commented

I have and when inputing a markdown that contains a fenced code block such
as this:

public static void main(String[] args ){
  System.out.println("hi");
}

It does not fire.
Could you care to elaborate?

On Sep 7, 2015 7:33 AM, "René Jeschke" notifications@github.com wrote:

The code BlockEmitter is only used for fenced code blocks, please have a
look at the README.md for how fenced code blocks work.


Reply to this email directly or view it on GitHub.

Here's a working example. Be sure to enable extended mode as fenced code blocks are not standard Markdown, and therefore need to be enabled explicitly.

https://gist.github.com/rjeschke/8ba48182d62124335f51

jdiaz commented

Thanks, got it to fire. It was the extendedProfile which was not forced.

On Mon, Sep 7, 2015 at 9:55 AM, René Jeschke notifications@github.com
wrote:

Here's a working example. Be sure to enable extended mode as fenced code
blocks are not standard Markdown, and therefore need to be enabled
explicitly.

https://gist.github.com/rjeschke/8ba48182d62124335f51


Reply to this email directly or view it on GitHub
#43 (comment).