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.
habitica-markdown
Advanced tools
A markdown-it module pre-configured for use in Habitica
npm install habitica-markdown --save
bower install habitica-markdown --save
In Node with browserify/webpack/etc:
var md = require('habitica-markdowm');
md.render('_markdown_ is **awesome**');
In a browser with script tag
var md = window.habiticaMarkdown;
md.render('_markdown_ is **awesome**');
Habitica Markdown comes pre-configured with
The emoji come pre-styled with:
.habitica-emoji {
height: 1.5em;
width: 1.5em;
}
If you'd like to override these values, you may need to apply the !important
keyword to your css
.
.habitica-emoji {
height: 100px !important;
}
The default markdown instance exposed by the module's index.js
comes preconfigured with the earlier described settings. However it also has two extra methods that give access to differently configured markdown-it instances. These instances have all the same behavior as described for the default instance but are extended with:
unsafe
functionality. i.e. it will not escape HTML and as such input HTML will be sent to the browser as HTML (Note, be very careful of XSS vulnerabilities when using this).withMentions
functionality. Turns @user mentions into <span class="at-text">@user</span>
.These instances can be respectively called by calling md.unsafeHtmlRender
and md.renderWithMentions
.
Alternatively, if you're only interested in one of these specific behaviors, these renderers can be accessed by importing them directly instead of the main module like so:
const md = require('habitica-markdown/withMentions')
md.render('@user is **awesome**!')
In a similar fashion the unsafe
renderer can be accessed by doing require('habitica-markdown/unsafe')
.
FAQs
A markdown-it module pre-configured for use in Habitica
The npm package habitica-markdown receives a total of 398 weekly downloads. As such, habitica-markdown popularity was classified as not popular.
We found that habitica-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.