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

fix html tags in example usage #100

Merged
merged 1 commit into from
Jan 13, 2015
Merged

fix html tags in example usage #100

merged 1 commit into from
Jan 13, 2015

Conversation

deiwin
Copy link

@deiwin deiwin commented Jan 13, 2015

the angle brackets were inverted

the angle brackets were inverted
@knsv
Copy link
Collaborator

knsv commented Jan 13, 2015

Thanks! I don't know how I could miss that ... :)

knsv added a commit that referenced this pull request Jan 13, 2015
fix html tags in example usage
@knsv knsv merged commit ca8fd04 into mermaid-js:gh-pages Jan 13, 2015
@deiwin
Copy link
Author

deiwin commented Jan 14, 2015

By the way, I ended up writing something like this (in coffeescript), to use mermaid with marked:

marked = require 'marked'

module.exports = (options) ->
  hasMermaid = false
  renderer = new marked.Renderer()
  renderer.defaultCode = renderer.code
  renderer.code = (code, language) ->
    if language is 'mermaid'
      html = ''
      if not hasMermaid
        hasMermaid = true
        html += '<script src="'+options.mermaidPath+'"></script>'
      html + '<div class="mermaid">'+code+'</div>'
    else
      @defaultCode(code, language)

  renderer

If you want you can update the example to something similar.

@deiwin deiwin deleted the patch-1 branch January 14, 2015 09:22
@knsv
Copy link
Collaborator

knsv commented Jan 15, 2015

Thanks, will add/uppdate that! Would be nice with a section on different ways to to add mermaid to a workflow.

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

Successfully merging this pull request may close these issues.

2 participants