Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
turndown-redmine
Advanced tools
turndown-redmine
turndown-redmine
is an HTML to GitHub Flavored Markdown converter designed to
work well for Redmine as the text destination.
Technically, it is an opinionated extension and configuration of Turndown that recognizes Redmine-specific constructs like macros and improves Turndown in several ways. The holy grail is to fully pass backtranslation tests and we are very close.
turndown-redmine
is able to transform specifics of HTML generated by Redmine
and JIRA and create Redmine constructs like attachment links accordingly.
There are two main use cases:
Using npm:
npm install turndown-redmine
In Node.js:
const TurndownRedmine = require('turndown-redmine');
const turndownRedmine = new TurndownRedmine();
const markdown = turndownRedmine.turndown(str);
Options can be passed in to the constructor on instantiation.
Option | Valid values | Default |
---|---|---|
fontColor | true or false | false |
attachmentUrlPatterns | RegExp | [/^\/secure\/attachment\/\d+\/\d+_([^/]+)$/,/^\/attachments\/download\/\d+\/([^/]+)$/] |
codeClassPatterns | RegExp | [/^(?:language|code)-(\S+)$/, /^(\S+)\s+syntaxhl$/] |
fence | ``` or ~~~ | ``` |
listSeparator | any string | \n<!-- end list -->\n |
listItemPadding | any integer | 0 |
citeDelimiter | <cite> or * | <cite> |
preformattedCode | true or false | true |
htmlEncodedRedmineMacros | true or false | true |
thumbnailMacro | true or false | true |
collapseMacro | true or false | true |
collapseMacroDefaultArgs | Array of 2 string values | ['Show', 'Hide'] |
fontColor
- Specifies whether colorized text should be rendered or not.attachmentUrlPatterns
- Array of RegExp patterns which match attachments
name in URL.codeClassPatterns
- Array of RegExp patterns which match code language in
code blocks.fence
- Code fence of fenced code block.listSeparator
- Separator of consecutive lists.citeDelimiter
- Specifies delimiter to be used for rendering <cite>
element.preformattedCode
- treat inline code as preformatted, should be considered
rather experimental, as correct escaping is not yet guaranteedhtmlEncodedRedmineMacros
- see
redmine_reformat's RedmineFormatter
for more detailsthumbnailMacro
- use Redmine {{thumbnail}}
macro for recognized image
thumbnails.collapseMacro
- use Redmine {{collapse}}
macro for recognized collapsed text.collapseMacroDefaultArgs
- Array of 2 string values that should be considered
as default collapse macro arguments. Macros with matching arguments will be rendered
with no arguments. Order of Array members is important.const TurndownRedmine = require('turndown-redmine');
const turndownRedmine = new TurndownRedmine();
const markdown = turndownRedmine.turndown('<h1>text</h1>');
Produces:
# text
Compared to Turndown, TurndownRedmine additionally uses two sets of rules:
TurndownPluginRedmine.js
Additional rules can be added either to TurndownPluginRedmine.js
if they are
relevant to Redmine, or as a module in RedmineTurndownService.js
.
FAQs
Library for converting HTML to Redmine-friendly Markdown
We found that turndown-redmine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.