You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

adobe-afm-transform

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adobe-afm-transform

Adobe Flavored Markdown transform

1.2.24
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

adobe-afm-transform

Adobe Flavored Markdown transform function for use within your toolchain.

Installation

npm install adobe-afm-transform

Usage

Named export is afm:

ES Module

import {afm} from 'adobe-afm-transform';

CommonJS / node.js

const {afm} = require('adobe-afm-transform');

Function parameters

  • Markdown string to transform
  • (Optional) CSS class to decorate, default is extension
  • (Optional) Markdown compiler, default is pass-thru - required to support nested markdown
  • (Optional) Admonitions map for consistent CSS classes, e.g. {"WICHTIG": "IMPORTANT"}
  • (Optional) Admonitions map for label rewrite, e.g. {"MORELIKETHIS": "Related Articles"}

Example

import {afm} from 'adobe-afm-transform';
const markdown = `# Sample

>[!NOTE]
>
>This is an AFM note!

This is a paragraph.
`;

afm(markdown);

The output would be:

# Sample

<div class="extension note">
<div>NOTE</div>
<div>
This is an AFM note!
</div>
</div>

This is a paragraph.

License

Copyright 2022 Adobe Inc. Licensed under the Apache-2.0 license.

Keywords

Adobe

FAQs

Package last updated on 12 May 2022

Did you know?

Socket

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.

Install

Related posts