<commit_before>package org.wordpress.aztec.plugins.visual2html

import android.annotation.SuppressLint
import android.text.style.CharacterStyle
import org.wordpress.aztec.plugins.IAztecPlugin

/**
 * An interface for processing spans during visual-to-HTML.
 */
@SuppressLint("NewApi")
interface IInlineSpanHandler : IAztecPlugin {
    /**
     * Determines, whether the content of a span (text, if any) should be parsed/rendered by [org.wordpress.aztec.AztecParser]
     *
     * @return true if content should be parsed, false otherwise.
     */
    fun shouldParseContent(): Boolean {
        return true
    }

    /**
     * Determines, whether the plugin can handle a particular [span] type.
     *
     * This method is called by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * @return true for compatible spans, false otherwise.
     */
    fun canHandleSpan(span: CharacterStyle): Boolean {
        return true
    }

    /**
     * A plugin handler used by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * This method is called when the beginning of a compatible span is encountered.
     *
     * @param html the resulting HTML string output.
     * @param span the encountered span.
     */
    fun handleSpanStart(html: StringBuilder, span: CharacterStyle)

    /**
     * A plugin handler used by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * This method is called when the ending of a compatible span is encountered.
     *
     * @param html the resulting HTML string output.
     * @param span the encountered span.
     */
    fun handleSpanEnd(html: StringBuilder, span: CharacterStyle)
}<commit_msg>Remove a default implementation as it can lead to errors<commit_after>package org.wordpress.aztec.plugins.visual2html

import android.annotation.SuppressLint
import android.text.style.CharacterStyle
import org.wordpress.aztec.plugins.IAztecPlugin

/**
 * An interface for processing spans during visual-to-HTML.
 */
@SuppressLint("NewApi")
interface IInlineSpanHandler : IAztecPlugin {
    /**
     * Determines, whether the content of a span (text, if any) should be parsed/rendered by [org.wordpress.aztec.AztecParser]
     *
     * @return true if content should be parsed, false otherwise.
     */
    fun shouldParseContent(): Boolean {
        return true
    }

    /**
     * Determines, whether the plugin can handle a particular [span] type.
     *
     * This method is called by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * @return true for compatible spans, false otherwise.
     */
    fun canHandleSpan(span: CharacterStyle): Boolean

    /**
     * A plugin handler used by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * This method is called when the beginning of a compatible span is encountered.
     *
     * @param html the resulting HTML string output.
     * @param span the encountered span.
     */
    fun handleSpanStart(html: StringBuilder, span: CharacterStyle)

    /**
     * A plugin handler used by [org.wordpress.aztec.AztecParser] during span-to-HTML parsing.
     *
     * This method is called when the ending of a compatible span is encountered.
     *
     * @param html the resulting HTML string output.
     * @param span the encountered span.
     */
    fun handleSpanEnd(html: StringBuilder, span: CharacterStyle)
}
{'fraction_non_alphanumeric': 0.08578932010504815, 'fraction_numerical': 0.0005836008170411438, 'mean_word_length': 2.9675925925925926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3232187', 'n_tokens_mistral': 972, 'n_tokens_neox': 918, 'n_words': 323}