Line.js
function(listsEnabled, lineAttributesEnabled) {
        if ((!hasList() && !hasLineAttributes) || (!listsEnabled && !lineAttributesEnabled)) {
                return {
                    lineAttributes: [],
                    inlineAttributeString: rawAttributeString,
                    inlinePlaintext: rawText
                };
            }
            
            if (listsEnabled && !lineAttributesEnabled) {
                if (hasList() && _hasNonlistLineAttributes()) {
                    return {
                        lineAttributes: [],
                        inlineAttributeString: _attributeStringWithoutListAttributes(rawAttributeString),
                        inlinePlaintext: rawText
                    };
                } else if (hasList() && !_hasNonlistLineAttributes()){
                    return {
                        lineAttributes: [],
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                } else if (!hasList() && hasLineAttributes){
                    return {
                        lineAttributes: [],
                        inlineAttributeString: rawAttributeString,
                        inlinePlaintext: rawText
                    };
                } else {
                    console.error("Plugin error: it seems the developer missed a case here.");
                }
            } else if (listsEnabled && lineAttributesEnabled) {
                if (_hasNonlistLineAttributes()) {
                    return {
                        lineAttributes: _withoutListAttributes(lineAttributes),
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                } else {
                    return {
                        lineAttributes: [],
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                }
            } else if (!listsEnabled && lineAttributesEnabled) {
                return {
                    lineAttributes: lineAttributes,
                    inlineAttributeString: inlineAttributeString,
                    inlinePlaintext: extractedText
                };
            } else {
                console.error("Plugin error: it seems the developer missed a case here.");
            }
    }
function(listsEnabled, lineAttributesEnabled) {
        if ((!hasList() && !hasLineAttributes) || (!listsEnabled && !lineAttributesEnabled)) {
                return {
                    lineAttributes: [],
                    inlineAttributeString: rawAttributeString,
                    inlinePlaintext: rawText
                };
            }
            
            if (listsEnabled && !lineAttributesEnabled) {
                if (hasList() && _hasNonlistLineAttributes()) {
                    return {
                        lineAttributes: [],
                        inlineAttributeString: _attributeStringWithoutListAttributes(rawAttributeString),
                        inlinePlaintext: rawText
                    };
                } else if (hasList() && !_hasNonlistLineAttributes()){
                    return {
                        lineAttributes: [],
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                } else if (!hasList() && hasLineAttributes){
                    return {
                        lineAttributes: [],
                        inlineAttributeString: rawAttributeString,
                        inlinePlaintext: rawText
                    };
                } else {
                    console.error("Plugin error: it seems the developer missed a case here.");
                }
            } else if (listsEnabled && lineAttributesEnabled) {
                if (_hasNonlistLineAttributes()) {
                    return {
                        lineAttributes: _withoutListAttributes(lineAttributes),
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                } else {
                    return {
                        lineAttributes: [],
                        inlineAttributeString: inlineAttributeString,
                        inlinePlaintext: extractedText
                    };
                }
            } else if (!listsEnabled && lineAttributesEnabled) {
                return {
                    lineAttributes: lineAttributes,
                    inlineAttributeString: inlineAttributeString,
                    inlinePlaintext: extractedText
                };
            } else {
                console.error("Plugin error: it seems the developer missed a case here.");
            }
    }
function ( listsEnabled , lineAttributesEnabled ) { if ( ( ! hasList ( ) && ! hasLineAttributes ) || ( ! listsEnabled && ! lineAttributesEnabled ) ) { return { lineAttributes : [ ] , inlineAttributeString : rawAttributeString , inlinePlaintext : rawText } ; } if ( listsEnabled && ! lineAttributesEnabled ) { if ( hasList ( ) && _hasNonlistLineAttributes ( ) ) { return { lineAttributes : [ ] , inlineAttributeString : _attributeStringWithoutListAttributes ( rawAttributeString ) , inlinePlaintext : rawText } ; } else if ( hasList ( ) && ! _hasNonlistLineAttributes ( ) ) { return { lineAttributes : [ ] , inlineAttributeString : inlineAttributeString , inlinePlaintext : extractedText } ; } else if ( ! hasList ( ) && hasLineAttributes ) { return { lineAttributes : [ ] , inlineAttributeString : rawAttributeString , inlinePlaintext : rawText } ; } else { console . error ( "Plugin error: it seems the developer missed a case here." ) ; } } else if ( listsEnabled && lineAttributesEnabled ) { if ( _hasNonlistLineAttributes ( ) ) { return { lineAttributes : _withoutListAttributes ( lineAttributes ) , inlineAttributeString : inlineAttributeString , inlinePlaintext : extractedText } ; } else { return { lineAttributes : [ ] , inlineAttributeString : inlineAttributeString , inlinePlaintext : extractedText } ; } } else if ( ! listsEnabled && lineAttributesEnabled ) { return { lineAttributes : lineAttributes , inlineAttributeString : inlineAttributeString , inlinePlaintext : extractedText } ; } else { console . error ( "Plugin error: it seems the developer missed a case here." ) ; } }
splits the line into line attributes and the remaining plain text and inline attributes
depending on the given parameters
@param {Boolean} listsEnabled if the client sent the parameter lists=true
@param {Boolean} lineAttributesEnabled if the client sent the parameter lineattribs=true
@return {lineAttributes: Array, inlineAttributeString: String, inlinePlaintext: String}
splits the line into line attributes and the remaining plain text and inline attributes depending on the given parameters