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

Image bug #575

Closed
MatteoGauthier opened this issue Aug 28, 2018 · 3 comments
Closed

Image bug #575

MatteoGauthier opened this issue Aug 28, 2018 · 3 comments
Assignees
Labels

Comments

@MatteoGauthier
Copy link

MatteoGauthier commented Aug 28, 2018

I get an error when the script is started. Here are the logs and my code js

images.js:66 Uncaught TypeError: title.replace is not a function
    at writeImageTag (images.js:66)
    at String.replace (<anonymous>)
    at images.js:100
    at spanGamut.js:15
    at headers.js:50
    at String.replace (<anonymous>)
    at headers.js:44
    at blockGamut.js:13
    at showdown.Converter.makeHtml (converter.js:323)
    at Object.success (index.js:43)
writeImageTag @ images.js:66
(anonymous) @ images.js:100
(anonymous) @ spanGamut.js:15
(anonymous) @ headers.js:50
(anonymous) @ headers.js:44
(anonymous) @ blockGamut.js:13
makeHtml @ converter.js:323
(anonymous) @ index.js:43
u @ jquery.min.js:2
fireWith @ jquery.min.js:2
k @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
w.(anonymous function) @ jquery.min.js:2
(anonymous) @ index.js:40
res/branding/UsefulTools%20Hero.svg:1 GET file:///C:/Users/mgpro/Documents/Dev/temp/test%20markdown/res/branding/UsefulTools%20Hero.svg 0 ()
Image (async)
(anonymous) @ index.js:7
u @ jquery.min.js:2
fireWith @ jquery.min.js:2
k @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
w.(anonymous function) @ jquery.min.js:2
(anonymous) @ index.js:4

$.get("https://raw.githubusercontent.com/MattixNow/usefultools/master/res/topics/OSX.md", function (gh) {
    var target = document.getElementById('renderedOSX'),
        converter = new showdown.Converter();
    target.innerHTML = converter.makeHtml(gh);
    myStr = target.innerHTML;

});

The text i want to convert
😄

@tivie tivie self-assigned this Aug 29, 2018
@tivie
Copy link
Member

tivie commented Aug 29, 2018

well, the error message is certainly cryptic. That is something I will fix in version 2.0 #576

Regarding your specific issue, I couldn't reproduce it. see this fiddle, it's working fine

Also, it works fine in the demo

@tivie
Copy link
Member

tivie commented Sep 14, 2018

This issue #585 reports the same issue as you. It should be fixed now in master.

@tivie tivie closed this as completed Sep 14, 2018
@tivie
Copy link
Member

tivie commented Sep 15, 2018


Donate Click here to lend your support to: ShowdownJS website and testing platform and make a donation at paypal.com

As you know, ShowdownJS is a free library and it will remain free forever. However, maintaining and improving the library costs time and money.
If you like our work and find our library useful, please donate through Pledgie or directly through paypal!! Your contribution will be greatly appreciated and help us continue to develop this awesome library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants