tryfabric / mack Goto Github PK
View Code? Open in Web Editor NEWMarkdown To Slack: Convert Markdown and GitHub Flavoured Markdown to Slack BlockKit block objects ๐๐ฌ
License: MIT License
Markdown To Slack: Convert Markdown and GitHub Flavoured Markdown to Slack BlockKit block objects ๐๐ฌ
License: MIT License
Discuss in #issue-2--support-markdown-tables
We don't currently support markdown tables, but we want to display them in some way, maybe within a code block.
markdownToBlocks(`
- asdf
- asdf2`)
Array [
Object {
"text": Object {
"text": "โข asdf",
"type": "mrkdwn",
},
"type": "section",
},
]
Array [
Object {
"text": Object {
"text": "โข asdf
โข asdf2",
"type": "mrkdwn",
},
"type": "section",
},
]
The current implementation to resolve the raw markdown into a markdown AST is not that efficient currently, since we convert to and from HTML during the process. This can probably be improved so that only one lexing / tokenizing is needed.
Discuss in #issue-4--prints-null-at-top-of-code-blocks-with-no-language-specified
This sometimes creates a markdown block with null
at the top of code-blocks with no language specified.
Repro steps:
null
string at the topDiscuss in #public-issue-6--truncate-text-to-fit-in-the-slack-api
What is the current functionality?
We don't truncate text in markdown blocks, headers, or image fields.
What problems are you facing with the current feature?
It's possible to send invalid blocks
What is your idea?
Truncate text to fit in the Slack API
Discuss in #public-issue-9--consider-using-the-marked-library-instead-of-remarkhype-to-reduc
The package is ~350kb minified
It's a little big
Swap out dependencies for smaller ones
I tested this package with examples,
But an error occured as below.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'lexer')
at markdownToBlocks (index.ts:27:1)
export async function markdownToBlocks(
body: string,
options: ParsingOptions = {}
): Promise<KnownBlock[]> {
const tokens = marked.lexer(body); // error line
return parseBlocks(tokens, options);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.