mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
🔥 Removed deprecated markdown wrapper
This commit is contained in:
parent
5def462bf0
commit
3b65081b5e
@ -6,7 +6,6 @@ module.exports = createCard({
|
||||
render: function (opts) {
|
||||
let converters = require('../converters');
|
||||
let payload = opts.payload;
|
||||
let version = opts.options && opts.options.version || 2;
|
||||
// convert markdown to HTML ready for insertion into dom
|
||||
let html = converters.markdownConverter.render(payload.markdown || '');
|
||||
|
||||
@ -14,13 +13,6 @@ module.exports = createCard({
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Ghost 1.0's markdown-only renderer wrapped cards. Remove in Ghost 3.0
|
||||
*/
|
||||
if (version === 1) {
|
||||
html = `<div class="kg-card-markdown">${html}</div>`;
|
||||
}
|
||||
|
||||
// use the SimpleDOM document to create a raw HTML section.
|
||||
// avoids parsing/rendering of potentially broken or unsupported HTML
|
||||
return opts.env.dom.createRawHTMLSection(html);
|
||||
|
@ -43,21 +43,5 @@ describe('Markdown card', function () {
|
||||
|
||||
serializer.serialize(card.render(opts)).should.eql('');
|
||||
});
|
||||
|
||||
it('[deprecated] version 1', function () {
|
||||
let opts = {
|
||||
env: {
|
||||
dom: new SimpleDom.Document()
|
||||
},
|
||||
payload: {
|
||||
markdown: '#HEADING\r\n- list\r\n- items'
|
||||
},
|
||||
options: {
|
||||
version: 1
|
||||
}
|
||||
};
|
||||
|
||||
serializer.serialize(card.render(opts)).should.eql('<!--kg-card-begin: markdown--><div class="kg-card-markdown"><h1 id="heading">HEADING</h1>\n<ul>\n<li>list</li>\n<li>items</li>\n</ul>\n</div><!--kg-card-end: markdown-->');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user