canvas-native
Version:
Utilities for working with the native Canvas format
39 lines (30 loc) • 565 B
JavaScript
import Type from './type';
export default class HorizontalRule extends Type {
get content() {
return '';
}
get isSummarized() {
return false;
}
toJSON() {
return {
type : this.type,
content: this.content,
}
}
toMarkdown(prev, next) {
if (!next) {
return this.match[0];
}
return this.match[0] + '\n';
}
static get markdownPattern() {
return this.nativePattern;
}
static get name() {
return 'horizontal-rule';
}
static get nativePattern() {
return /^((?:- ?){3,})$/;
}
}