mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Refactor markdown/sanitize html code
This commit is contained in:
parent
9afb5c10e5
commit
9ff36c2d70
7 changed files with 67 additions and 70 deletions
23
shared/core-utils/renderer/markdown.ts
Normal file
23
shared/core-utils/renderer/markdown.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
export const TEXT_RULES = [
|
||||
'linkify',
|
||||
'autolink',
|
||||
'emphasis',
|
||||
'link',
|
||||
'newline',
|
||||
'list'
|
||||
]
|
||||
|
||||
export const TEXT_WITH_HTML_RULES = TEXT_RULES.concat([
|
||||
'html_inline',
|
||||
'html_block'
|
||||
])
|
||||
|
||||
export const ENHANCED_RULES = TEXT_RULES.concat([ 'image' ])
|
||||
export const ENHANCED_WITH_HTML_RULES = TEXT_WITH_HTML_RULES.concat([ 'image' ])
|
||||
|
||||
export const COMPLETE_RULES = ENHANCED_WITH_HTML_RULES.concat([
|
||||
'block',
|
||||
'inline',
|
||||
'heading',
|
||||
'paragraph'
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue