Skip to content
Permalink
Browse files

feat: remove html tags in code and remove table styles

  • Loading branch information...
ulivz committed Apr 5, 2019
1 parent 9a0b38e commit fe75e464f51b50cd17af3004aac291909471479c
Showing with 16 additions and 1 deletion.
  1. +16 −1 lib/html.js
@@ -28,7 +28,9 @@ const transformHeaders = compose(
return $
}
),
highlight
highlight,
escapeHTMLTagInCode,
removeTableStyls,
)

function getHash(i) {
@@ -61,3 +63,16 @@ function highlight($) {
})
return $
}

function escapeHTMLTagInCode($) {
$('code').replaceWith((i, el) => {
const content = el.text()
return escape(content)
})
return $
}

function removeTableStyls($) {
$('code').css('width', '')
return $
}

0 comments on commit fe75e46

Please sign in to comment.
You can’t perform that action at this time.