Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration setCodeBlockEmitter not working propperly #43

Open
jdiaz opened this issue Sep 7, 2015 · 4 comments
Open

Configuration setCodeBlockEmitter not working propperly #43

jdiaz opened this issue Sep 7, 2015 · 4 comments

Comments

@jdiaz
Copy link

jdiaz commented Sep 7, 2015

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.

@rjeschke
Copy link
Owner

rjeschke commented Sep 7, 2015

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
Copy link
Author

jdiaz commented Sep 7, 2015

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" [email protected] 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.

@rjeschke
Copy link
Owner

rjeschke commented Sep 7, 2015

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
Copy link
Author

jdiaz commented Sep 8, 2015

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

On Mon, Sep 7, 2015 at 9:55 AM, René Jeschke [email protected]
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants