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