Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:45
    code-by-gijs commented #866
  • 15:41
    SyntaxRules commented #866
  • 15:14
    code-by-gijs commented #866
  • Dec 06 19:36
    SyntaxRules commented #857
  • Dec 06 09:51
    adarmanto commented #217
  • Dec 05 09:00
    kospl closed #857
  • Dec 05 09:00
    kospl commented #857
  • Nov 30 09:41
    kospl commented #857
  • Nov 30 09:36
    kospl edited #857
  • Nov 30 05:52
    aote777 commented #857
  • Nov 29 23:14
    ghazpar commented #861
  • Nov 29 23:10
    ghazpar commented #861
  • Nov 29 23:07
    ghazpar commented #861
  • Nov 29 22:43
    ghazpar commented #861
  • Nov 29 17:46
    SyntaxRules closed #841
  • Nov 29 17:38
    SyntaxRules labeled #842
  • Nov 29 17:38
    SyntaxRules labeled #842
  • Nov 29 17:35
    SyntaxRules labeled #856
  • Nov 29 17:35
    SyntaxRules labeled #856
  • Nov 29 17:35
    SyntaxRules commented #856
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
Marius Hartig
@mariushartig
hello guys, how i can setup the urls for a images ?
Marius Hartig
@mariushartig
is some one ative here ? :)