mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 11:22:40 +00:00
Renderer is always V3. No need to check.
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
|
const Markdown = require('../../../../shared/naturalcrit/markdown.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
createFooterFunc : function(headerSize=1){
|
createFooterFunc : function(headerSize=1){
|
||||||
return (props)=>{
|
return (props)=>{
|
||||||
const cursorPos = props.cursorPos;
|
const cursorPos = props.cursorPos;
|
||||||
const renderer = props.brew.renderer || 'V3';
|
|
||||||
|
|
||||||
const Markdown = renderer == 'V3' ? require('../../../../shared/naturalcrit/markdown.js') : require('../../../../shared/naturalcrit/markdownLegacy.js');
|
|
||||||
|
|
||||||
const markdownText = props.brew.text.split('\n').slice(0, cursorPos.line).join('\n');
|
const markdownText = props.brew.text.split('\n').slice(0, cursorPos.line).join('\n');
|
||||||
const markdownTokens = Markdown.marked.lexer(markdownText);
|
const markdownTokens = Markdown.marked.lexer(markdownText);
|
||||||
|
|||||||
Reference in New Issue
Block a user