![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
markdown-it-reddit-supsubscript
Advanced tools
Reddit's super/subscript syntax for markdown-it by ${Mr.DJA}.
Reddit's super/subscript syntax for markdown-it by ${Mr.DJA}.
This is a plugin for markdown-it uses markdown-it-regexp to render superscripts like those on Reddit: ^superscript
^(superscript)
, and subscripts with a similar syntax: ~superscript
~(superscript)
.
In fact Reddit doesn't support subscripts, but people need them so they are available here. Smart move huh? ^-^
⚠ A note about v2.0.0:
This version introduces breaking changes, it has a completely new API and uses a different implementation. The plugin doesn't depend on markdown-it directly anymore, instead, it uses the method
.renderInline()
from themd
object that is already passed as an argument to the plugin function. Also, it depends on the fork@gerhobbelt/markdown-it-regexp
now since it's more advanced than the original project.It's highly recommended to upgrade! The previous version is functional but not suitable for production use.
From NPM:
npm install markdown-it-reddit-supsubscript --save
const markdownItRedditSupsubscript = require("markdown-it-reddit-supsubscript")
This works on Node. Use a module bundler if you want it for browser.
Browser:
A pre-built version for browser is available over JsDeliver CDN:
<script src='https://cdn.jsdelivr.net/gh/iMrDJAi/markdown-it-reddit-supsubscript/dist/markdown-it-reddit-supsubscript.min.js'></script>
It will be available as window.markdownItRedditSupsubscript
:
const markdownItRedditSupsubscript = window.markdownItRedditSupsubscript
⚠ Warning!
The previous version used a different name for the plugin:
markdownitRedditSupSubScript
. Make sure to update it tomarkdownItRedditSupsubscript
when upgrading!
The usage is way simpler than it was in v1.0.0:
const markdownit = require('markdown-it')
const markdownItRedditSupsubscript = require('markdown-it-reddit-supsubscript')
const options = { // Default options. Use `false` to disable unwanted rules
superscriptParenthesized: true, // To enable ^(superscript)
superscript: true, // To enable ^superscript
subscriptParenthesized: true, // To enable ~(supscript)
subscript: true // To enable ~supscript
}
const md = markdownit.use(
markdownItRedditSupsubscript, // Plugin
options // Options are not required
)
function renderMarkdown(text) { // A function to convert markdown to html
return md.render(text)
}
Preview:
Enjoy <3.
Wanna use markdown-it-reddit-supsubscript on your next big project? Let me now and it will be listed here! :)
FAQs
Reddit's super/subscript syntax for markdown-it by ${Mr.DJA}.
The npm package markdown-it-reddit-supsubscript receives a total of 1 weekly downloads. As such, markdown-it-reddit-supsubscript popularity was classified as not popular.
We found that markdown-it-reddit-supsubscript 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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.