2022-03-03 20:15:50 +08:00
|
|
|
/**
|
|
|
|
* Created by Estevao on 15-01-2015.
|
|
|
|
*/
|
2022-03-27 08:05:30 +08:00
|
|
|
//let showdown = require('../../.build/showdown.js') || require('showdown');
|
|
|
|
chai.should();
|
2022-03-03 20:15:50 +08:00
|
|
|
|
|
|
|
describe('showdown.Converter', function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
describe('makeMarkdown()', function () {
|
2022-03-27 08:05:30 +08:00
|
|
|
let converter = new showdown.Converter();
|
2022-03-03 20:15:50 +08:00
|
|
|
|
|
|
|
it('should parse a simple html string', function () {
|
2022-03-27 08:05:30 +08:00
|
|
|
let html = '<a href="/somefoo.html">a link</a>\n';
|
|
|
|
let md = '[a link](</somefoo.html>)';
|
2022-03-03 20:15:50 +08:00
|
|
|
|
2022-03-10 20:56:34 +08:00
|
|
|
converter.makeMarkdown(html).should.equal(md);
|
2022-03-03 20:15:50 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|