Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@codemirror/lang-markdown
Advanced tools
Changelog
6.2.5 (2024-04-12)
Disable folding for list nodes (since it will shadow the folding on the first list item).
Readme
[ WEBSITE | ISSUES | FORUM | CHANGELOG ]
This package implements Markdown language support for the CodeMirror code editor.
The project page has more information, a number of examples and the documentation.
This code is released under an MIT license.
We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.
markdown(config?: Object = {}) → LanguageSupport
Markdown language support.
config
defaultCodeLanguage?: Language | LanguageSupport
When given, this language will be used by default to parse code blocks.
codeLanguages?: readonly LanguageDescription[] | fn(info: string) → Language | LanguageDescription | null
A source of language support for highlighting fenced code
blocks. When it is an array, the parser will use
LanguageDescription.matchLanguageName
with the fenced code info to find a matching language. When it
is a function, will be called with the info string and may
return a language or LanguageDescription
object.
addKeymap?: boolean
Set this to false to disable installation of the Markdown keymap.
extensions?: MarkdownExtension
Markdown parser extensions to add to the parser.
base?: Language
The base language to use. Defaults to
commonmarkLanguage
.
markdownLanguage: Language
Language support for GFM plus subscript, superscript, and emoji syntax.
commonmarkLanguage: Language
Language support for strict CommonMark.
insertNewlineContinueMarkup: StateCommand
This command, when invoked in Markdown context with cursor selection(s), will create a new line with the markup for blockquotes and lists that were active on the old line. If the cursor was directly after the end of the markup for the old line, trailing whitespace and list markers are removed from that line.
The command does nothing in non-Markdown context, so it should not be used as the only binding for Enter (even in a Markdown document, HTML and code regions might use a different language).
deleteMarkupBackward: StateCommand
This command will, when invoked in a Markdown context with the cursor directly after list or blockquote markup, delete one level of markup. When the markup is for a list, it will be replaced by spaces on the first invocation (a further invocation will delete the spaces), to make it easy to continue a list.
When not after Markdown block markup, this command will return false, so it is intended to be bound alongside other deletion commands, with a higher precedence than the more generic commands.
markdownKeymap: readonly KeyBinding[]
A small keymap with Markdown-specific bindings. Binds Enter to
insertNewlineContinueMarkup
and Backspace to
deleteMarkupBackward
.
FAQs
Markdown language support for the CodeMirror code editor
The npm package @codemirror/lang-markdown receives a total of 174,332 weekly downloads. As such, @codemirror/lang-markdown popularity was classified as popular.
We found that @codemirror/lang-markdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.