Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 21 15:19
    DjGamerDz closed #761
  • Jan 20 06:19
    greenkeeper[bot] commented #627
  • Jan 20 06:19

    greenkeeper[bot] on jsdom-16.0.1

    fix(package): update jsdom to v… chore(package): update lockfile… (compare)

  • Jan 16 08:23

    greenkeeper[bot] on sinon-8.1.0

    chore(package): update sinon to… chore(package): update lockfile… (compare)

  • Jan 16 08:23
    greenkeeper[bot] commented #641
  • Jan 14 19:07
    Chopinsky commented #760
  • Jan 14 19:06
    Chopinsky commented #760
  • Jan 14 18:15
    Chopinsky edited #762
  • Jan 14 18:15
    Chopinsky opened #762
  • Jan 14 18:00
    Chopinsky commented #760
  • Jan 14 17:59
    Chopinsky commented #760
  • Jan 13 07:34
    jcs090218 commented #760
  • Jan 12 23:04
    obedm503 commented #761
  • Jan 12 19:56
    DjGamerDz commented #754
  • Jan 12 19:55
    DjGamerDz edited #761
  • Jan 12 19:54
    DjGamerDz opened #761
  • Jan 06 07:26
    deligent-ant opened #760
  • Jan 06 01:34
    yangyijun-cool commented on 9b297fa
  • Jan 01 18:06
    isakal closed #727
  • Jan 01 18:06
    isakal commented #727
Matt Ma
@mattma
@all A question, using showdown in angular-cli built angular2 project, using systemjs as module loader, tried es2015 module syntax, import Showdown from 'showdown' Showdown is undefinied. Does showodown support ES6 import format?
heatmonkey
@heatmonkey
if I use Uglify or Dedupe on WebPack, showdown dies.
It works until I do that
I think -- import * as Showdown from 'showdown' -- should work
heatmonkey
@heatmonkey
When I uglify or optimize at all, I get a runtime error: Template parse errors:
Unexpected closing tag "a" (" using Markdown, see the <a href=http://commonmark.org/help/ target=_blank>Common Markdown Reference[ERROR ->]</a> </p> </div> </div>"
heatmonkey
@heatmonkey
Nevermind
not related
This is a red herring from webpack config
georgesben
@georgesben
Hi everybody !
georgesben
@georgesben

I'm trying to load the twitter extension (I suppose it's for twitter-bootstrap) but I failed. I have downloaded the js and put it in my folder extension.

 <script src="extensions/twitter.js"></script>
[...] // HTML  and the beginning of the second script tag
var converter = new showdown.Converter({'tables' : true, 'ghCodeBlocks' : true, extensions : 'twitter' });

I think I can load this extensions with the options at the same time. But I have the following response error: Uncaught Error: Extension "t" could not be loaded. It was either not found or is not a valid extension.(…). So I have tried the version server side (where extensions key takes an array) but I have this error: showdown.js:799Uncaught Error: Extension "twitter" could not be loaded. It was either not found or is not a valid extension.

Can someone help me, please ? :)
Thank you in advance ^^

Estevão Soares dos Santos
@tivie
That's a strange error
Estevão Soares dos Santos
@tivie
extensions should always be an array
var converter = new showdown.Converter({'tables' : true, 'ghCodeBlocks' : true, extensions : ['twitter'] });
georgesben
@georgesben
The npm page doc, for the client side, is wrong in that case: https://www.npmjs.com/package/showdown
When I use this:
var converter = new showdown.Converter({'tables' : true, 'ghCodeBlocks' : true, extensions : ['twitter'] });
I have this error Uncaught Error: Extension "twitter" could not be loaded. It was either not found or is not a valid extension.
Estevão Soares dos Santos
@tivie
are you importing the extension in your html file?
the twitter extension should be loaded after showdown
<script src="showdown.min.js"></script>
<script src="twitter-extensions.min.js"></script>
something like this
<script src="showdown.min.js"></script>
<script src="showdown-twitter.min.js"></script>
<script>
var converter = new showdown.Converter({'tables' : true, 'ghCodeBlocks' : true, extensions : ['twitter'] });
</script>
Ian Gann
@ihgann
Hi, just thought I'd mention the demo page http://showdownjs.github.io/demo/ is currently broken.
Johnson Zhong
@LemonPi
Hey I wanted to confirm showdown's appropriate for my use case before digging in
I want to write documentation in markdown but transform the output in a certain way
For example, ## Header 2 by default converts to <h2>Header 2</h2>
I want it to convert to
<h2 class="anchor">Header 2 <a class="anchor-link" title="permalink to section" href="#header2"
                               name="header2">&para;</a></h2>
showdown with a custom output extension seems to able to do this from its description
Is this true? And if so are there any documentation on writing output extensions? (the wiki only has a language extension example)
Estevão Soares dos Santos
@tivie
@LemonPi Yes, you can customize headings (or any other HTML tag for that matter) with extensions.
Output extension would work work. A listener extension might be more appropriate for the heading specific case, though.
Estevão Soares dos Santos
@tivie
for version 2.0-alpha
showdown.extension('foo', function () {
  return [{
    type: 'listener',
    listeners: {
      'makehtml.headers.before': function (event, text) {
        // do something
        return text;
      }
    }
  }]
});
Johnson Zhong
@LemonPi
Thanks for the response. Everything's been working great with output extensions (and language extensions)! Showdown's really great :D