Skip to content

Commit

Permalink
b, s tag support resolve #48
Browse files Browse the repository at this point in the history
  • Loading branch information
Sungho Kim authored and seonim-ryu committed Feb 5, 2020
1 parent 04dbc07 commit 5ad963d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libs/to-mark/src/renderer.basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ var basicRenderer = Renderer.factory({
'CODE TEXT_NODE': function(node) {
return node.nodeValue;
},
'EM': function(node, subContent) {
'EM, B': function(node, subContent) {
var res;

res = '*' + subContent + '*';

return res;
},
'STRONG': function(node, subContent) {
'STRONG, S': function(node, subContent) {
var res;

res = '**' + subContent + '**';
Expand Down
6 changes: 4 additions & 2 deletions libs/to-mark/test/renderer.basic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ describe('basicRenderer', function() {
});

describe('inline', function() {
it('em', function() {
it('em, b', function() {
expect(getMarkdownText('<em></em>', 'emphasis')).toEqual('*emphasis*');
expect(getMarkdownText('<b></b>', 'emphasis')).toEqual('*emphasis*');
});

it('link', function() {
Expand All @@ -53,8 +54,9 @@ describe('basicRenderer', function() {
expect(getMarkdownText('<img src="http://www.nhnent.com" alt="NHNENT" />')).toEqual('![NHNENT](http://www.nhnent.com/)');
});

it('strong', function() {
it('strong, s', function() {
expect(getMarkdownText('<strong></strong>', 'imstrong')).toEqual('**imstrong**');
expect(getMarkdownText('<s></s>', 'imstrong')).toEqual('**imstrong**');
});

it('code', function() {
Expand Down

0 comments on commit 5ad963d

Please sign in to comment.