 
         super.insertText(text)
 
-        ensureRemovalOfSingleLineParagraphAttributes(afterInserting: text)
+        ensureRemovalOfSingleLineParagraphAttributesAfterPressingEnter(input: text)
 
         restoreDefaultFontIfNeeded()
 

    ///
    /// - Returns: `true` if we should remove paragraph attributes, otherwise it returns `false`.
    ///
    func mustRemoveSingleLineParagraphAttributes(afterInserting text: String) -> Bool {
        return text.isEndOfLine()
    }



            let applicationRange = formatter.applicationRange(for: selectedRange, in: textStorage)
            formatter.removeAttributes(from: textStorage, at: applicationRange)
        }
    }

    // MARK: - Remove paragraph styles when pressing enter in an empty paragraph

    /// Removes paragraph attributes after a selection change.  The logic that defines if the
    /// attributes must be removed is located in
    /// `mustRemoveSingleLineParagraphAttributesAfterSelectionChange()`.
    ///
    /// - Parameters:
    ///     - input: the user's input.  This method must be called before the input is processed.
    ///
    func ensureRemovalOfParagraphAttributesWhenPressingEnterInAnEmptyParagraph(input: String) -> Bool {
        guard mustRemoveParagraphAttributesWhenPressingEnterInAnEmptyParagraph(input: input) else {
            return false
        }

        removeParagraphAttributes(at: selectedRange)

        return true
    }

    /// Analyzes whether paragraph attributes should be removed from the specified
    /// location, or not, after the selection range is changed.
    ///
    /// - Returns: `true` if we should remove paragraph attributes, otherwise it returns `false`.
    ///
    func mustRemoveParagraphAttributesWhenPressingEnterInAnEmptyParagraph(input: String) -> Bool {
        return input.isEndOfLine()
            && storage.string.isEmptyParagraph(at: selectedRange.location)
    }

    // MARK: - WORKAROUND: removing styles at EOF due to selection change

    /// Removes paragraph attributes after a selection change.  The logic that defines if the
    /// attributes must be removed is located in
