New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

indent-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indent-utils

Indented filter utilities, including Showdown extensions / HyperPug filters' maker

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

eqdict

npm version

Indented filter utilities, including Showdown extensions / HyperPug filters' maker

Usage

import { createIndentedFilter } from "indent-utils";
const filterFn = createIndentedFilter("x1", (coveredText, attrs) => {
  return customFn(coveredText, attrs)
});
const showdownX1Extension = {
  type: "lang",
  filter: filterFn
};

Example matched cases,

^^x1 hello
^^x1(source="github") hello
![](^^x1(source="github") hello^^)
^^x1(source="github").
  thank you
    very

  much

For more test cases, see /tests/index.spec.yaml

Usage on the browser

<script src="https://unpkg.com/indent-utils@:version/umd/index.min.js"></script>
<script>
const filterFn = createIndentedFilter("x1", (coveredText, attrs) => {
  return customFn(coveredText, attrs)
})
const showdownX1Extension = {
  type: "lang",
  filter: filterFn
}
</script>

Keywords

showdownjs

FAQs

Package last updated on 10 Jan 2020

Related posts