mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 19:04:16 +01:00 
			
		
		
		
	![dependabot[bot]](/assets/img/avatar_default.png) 0a50b835b1
			
		
	
	0a50b835b1
	
	
	
		
			
			Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yash-Singh1 <saiansh2525@gmail.com>
		
			
				
	
	
		
			13 lines
		
	
	
		
			393 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			393 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const { Generator } = require('jison');
 | |
| const validate = require('schema-utils');
 | |
| const schema = require('./parser-options-schema.json');
 | |
| 
 | |
| module.exports = function jisonLoader(source) {
 | |
|   const options = this.getOptions();
 | |
|   (validate.validate || validate)(schema, options, {
 | |
|     name: 'Jison Loader',
 | |
|     baseDataPath: 'options',
 | |
|   });
 | |
|   return new Generator(source, options).generate();
 | |
| };
 |