Coder Social home page Coder Social logo

prettify-extension's People

Contributors

syntaxrules avatar tivie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

prettify-extension's Issues

src for the prettify files

Do these files come from dist folder or src one? Thanks.

<script src="showdown.min.js">
<script src="showdown-prettify.min.js">

Loading showdown-prettify extension from node

Hi. I am trying to load the showdown-prettify extension from node + DOMJS. Using requires or whatever, but not from script tags in HTML. I have no idea how to do it.

An example would be welcome. (Even if the package is not used much, it is a dependency of the drawthe.net github repo, which allows to take YAML descriptions of network topologies and render them as SVG.)

DEPRECATION WARNING

DEPRECATION WARNING: prettify is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!

DEPRECATION WARNING

I got this warning in the latest version of Chrome.

DEPRECATION WARNING: prettify is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!

It seems not working with ng-showdown

Hello,

I try to use prettify-extension with ng-showdown but without any success I believe. I'm not 100% sure this is a bug.

I start by adding Prettify as an extension to showdown :

$showdownProvider.loadExtension('prettify');

Then I use directive :

<p markdown-to-html="postCtrl.markdown"></p>

Result in plain html :

<pre class="prettyprint linenums">
<code class="language-javascript">var gulp = require('gulp');
gulp.task('default', function(){
console.log()
});
</code></pre>

All js and css are loaded properly.

Deprecation warning

Hi, we are getting this warning:

DEPRECATION WARNING: prettify is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!

And it origins here. Can you please update this extension so it uses the new loader method?

Thanks!

What am I doing wrong with github flavor?

index.html

<!DOCTYPE html>
<html>
<head>
  <title>index</title>
  <meta charset="UTF-8"/>


  <script src="./js/showdown.min.js"></script>
  <script src="./js/showdown-prettify.min.js"></script>
  <script src="./js/main.js"></script>

</head>
<body>


</body>
</html>

main.js

showdown.setFlavor('github');

var converter = new showdown.Converter({extensions: ['prettify']});
var input = "```js\n" +
    "function add(a, b) { console.log(); }\n" +
    "```";
var html = converter.makeHtml(input);
console.log(html);

output

<pre class="prettyprint linenums"><code class="js language-js">function add(a, b) { console.log(); }</code></pre>

Error loading the extension

I get the following error:

Uncaught Error: Extension "prettify" could not be loaded. It was either not found or is not a valid extension.

I load it as stated in the docs:

var converter = new Converter({extensions: ['prettify']});

I wonder if anyone is still actively using this extension. npm suggest that there are barely 100 weekly downloads for this extension, whereas showdowjs itself has over 300k per week. Is there some other way of "prettifying" the code without using this extension that people tend to prefer?

Needs include prettify as well?

Hi, thanks for this plugin. It seems working well.
I have the string:

<a href="#">link</a>

That converts the follow html:

<pre class="prettyprint linenums">
    <code class="html language-html">&lt;a href="#"&gt;link&lt;/a&gt;</code>
</pre>

However, there's no syntax highlighter in here. Do I need to include any css?

PS: If I include the run_prettify.js it works. It supposed to be it?

<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.