<commit_before>const Relation = require('./Relation');

class XmlStylesheet extends Relation {
    get href() {
        var matchData = this.node.data.match(/href="([^"]*)"/);
        if (matchData) {
            return matchData[1].replace(/&quot;/, '"').replace(/&amp;/, '&');
        }
    }

    set href(href) {
        this.node.data = this.node.data.replace(/href="([^"]*)"/, 'href="' + href.replace(/&/g, '&amp;').replace(/"/g, '&quot;') + '"');
    }

    inline() {
        super.inline();
        this.href = this.to.dataUrl;
        this.from.markDirty();
        return this;
    }

    attach() {
        throw new Error('XmlStylesheet.attach: Not supported');
    }

    detach() {
        this.node.parentNode.removeChild(this.node);
        this.node = undefined;
        super.detach();
    }
};

XmlStylesheet.prototype.targetType = 'Xml';

module.exports = XmlStylesheet;
<commit_msg>XmlStylesheet#targetType can be more than one thing<commit_after>const Relation = require('./Relation');

class XmlStylesheet extends Relation {
    get href() {
        var matchData = this.node.data.match(/href="([^"]*)"/);
        if (matchData) {
            return matchData[1].replace(/&quot;/, '"').replace(/&amp;/, '&');
        }
    }

    set href(href) {
        this.node.data = this.node.data.replace(/href="([^"]*)"/, 'href="' + href.replace(/&/g, '&amp;').replace(/"/g, '&quot;') + '"');
    }

    inline() {
        super.inline();
        this.href = this.to.dataUrl;
        this.from.markDirty();
        return this;
    }

    attach() {
        throw new Error('XmlStylesheet.attach: Not supported');
    }

    detach() {
        this.node.parentNode.removeChild(this.node);
        this.node = undefined;
        super.detach();
    }
};

module.exports = XmlStylesheet;

{'fraction_non_alphanumeric': 0.1971127151582454, 'fraction_numerical': 0.001110494169905608, 'mean_word_length': 2.3432282003710574, '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': '1982212', 'n_tokens_mistral': 596, 'n_tokens_neox': 589, 'n_words': 98}