All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- upgrade
markdownit
to v14 - un-vendor
markdown-it-class
in favor of updated fork - vendor
highlight.js
to reduce dependencies' size - simplify hljs syntax loading
v4 of Arcdown will remove all default syntaxes for hljs in favor of user-defined syntaxes. This will greatly reduce the size of the package and allow for more granular control over syntaxes.
A guide and tooling will be provided to help users bring in pre-built syntaxes.
Further, v4 will likely vendor markdown-it
since that dependency ships > 1MB of unused (in Arcdown) code.
- each instance of Arcdown will use a new instance of
hljs
- this is more performant in single-execution cloud functions and was the intended design
- upgrade dependencies
- replace tap (50MB+) with tape
- remove tsd and .d.ts in favor of JSDoc
- upgraded dependencies
- swapped
dtslint
fortsd
for type testing
- hljs options now accepts
sublaunguages
dictionary to register languages that may be used inside a parent grammar.
Example:
{
hljs: {
sublanguages: {
javascript: [ 'xml', 'css' ]
}
}
}
```javascript
html`
<h1>Welcome</h1>
<p>Hello, world</p>
`
css`
h1 {
color: red;
margin-bottom: 2rem;
}
`
```
hljs highlighting will be applied to the HTML (as "xml") and CSS strings.
Large-ish refactor to use a named class
export.
import { Arcdown } from 'arcdown'
Arcdown
class interfacemarkdownItAnchor
andmarkdownItToc
*see "Changed" below
default
function as render interfacemarkdown-it-toc-and-anchor
*see "Changed" below
- class-based interfaces
- new table of contents plugin
markdownItTocAndAnchor
retired- use
markdown-it-anchor
asmarkdownItAnchor
for heading anchor creation - use
markdown-it-toc-done-right
asmarkdownItToc
for table of contents
- lowercase
arcdown
changed to Arcdown
- hljs plugin application in subsequent render calls
- caused by instantiating hljs options on each render, solved with class structures
- handle codefence language specifiers with trailing spaces and meta info
- this correctly loads the
javascript
language for syntax highlighting:
- this correctly loads the
```javascript 12:42;foo-bar
- readme formatting fix for npmjs.org
- move hljs plugin config to
options.hljs.plugins
- overhaul readme
- Pass hljs plugins through to built-in hljs highlighter.
- Support for 4-tick fence syntax highlighting with automatic language loading.
- Swapped in
gray-matter
fortiny-frontmatter
for improved YAML parsing of document front matter.
arcdown
Types of changes:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security