Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 11 17:07
    kospl edited #857
  • Jun 11 17:07
    kospl opened #857
  • Jun 10 20:04
    connorjs commented #666
  • Jun 10 05:27
    SomwareHR commented #673
  • Jun 10 05:26
    SomwareHR commented #673
  • Jun 09 15:07
    karthik2206 commented #582
  • Jun 06 09:33
    splch commented #730
  • May 17 16:23
    sojs-coder commented #233
  • May 17 16:15
    sojs-coder commented #850
  • May 17 16:05
    sojs-coder commented #582
  • May 13 06:26
    abubakar-shehu commented #831
  • May 11 20:21
    erictuvesson opened #856
  • May 10 01:05
    jlcreator opened #855
  • May 09 12:27
    dependabot[bot] labeled #854
  • May 09 12:27
    dependabot[bot] opened #854
  • May 09 12:27

    dependabot[bot] on npm_and_yarn

    build(deps): bump hosted-git-in… (compare)

  • May 07 03:13

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 07 03:13
    dependabot[bot] closed #812
  • May 07 03:13
    dependabot[bot] commented #812
  • May 07 03:13
    dependabot[bot] labeled #853
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