This commit is contained in:
2025-05-12 05:38:44 +09:00
parent dced21c3f8
commit 6d78bfa46e
8120 changed files with 1161564 additions and 0 deletions

24
book/node_modules/kramed/lib/annotate/block.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
var rules = require('../rules/block').tables;
var engine = require('./engine');
// List of all the regexes we want to run
var ruleTypes = [
'newline', 'code', 'fences', 'footnote', 'heading',
'nptable', 'lheading', 'hr', 'blockquote', 'list',
'html', 'def', 'table', 'paragraph', 'text',
];
// Mapping if rule type is different from token type
var ruleMap = {
'nptable': 'table',
'lheading': 'heading',
'newline': 'space',
'fences': 'code',
};
function annotate(src) {
return engine(src, rules, ruleTypes, ruleMap);
}
module.exports = annotate;