<commit_before>$.tooltipster.plugin({
	name: 'tooltipster.SVG',
	core: {
		_init: function() {
			
			$.tooltipster.on('init', function(event) {
				
				var window = $.tooltipster.env.window,
					$origin = $(event.origin);
				
				if (	window.SVGElement
					&&	event.origin instanceof window.SVGElement
				) {
					
					// jQuery < v3.0's addClass and hasClass do not work on SVG elements.
					// However, $('.tooltipstered') does find elements having the class.
					if (!$origin.hasClass('tooltipstered')) {
						
						var c = $origin.attr('class') || '';
						
						if (c.indexOf('tooltipstered') == -1) {
							$origin.attr('class', c + ' tooltipstered');
						}
					}
					
					// auto-activation of the plugin on the instance
					if ($.inArray('tooltipster.SVG', event.instance.option('plugins')) === -1) {
						event.instance._plugin('tooltipster.SVG');
					}
					
					// if there is no content yet, let's look for a <title> child element
					if (event.instance.content() === null) {
						
						// TODO: when there are several <title> tags (not supported in
						// today's browsers yet though, still an RFC drat), pick the right
						// one based on the "lang" attribute 
						var content = $origin.find('title').text();
						event.instance.content(content);
					}
					
					// rectify the geometry if SVG.js and its screenBBox plugin have been included
					event.instance
						._on('geometry', function(event) {
							
							// SVG coordinates may need fixing but we need svg.screenbox.js
							// to provide it. SVGElement is IE8+
							if (window.SVG.svgjs) {
								
								if (!window.SVG.parser) {
									window.SVG.prepare();
								}
								
								var svgEl = window.SVG.adopt(event.origin);
								
								// not all figures need (and have) screenBBox
								if (svgEl && svgEl.screenBBox) {
									
									var bbox = svgEl.screenBBox();
									
									event.edit({<commit_msg>if there is no svg title either<commit_after>$.tooltipster.plugin({
	name: 'tooltipster.SVG',
	core: {
		_init: function() {
			
			$.tooltipster.on('init', function(event) {
				
				var window = $.tooltipster.env.window,
					$origin = $(event.origin);
				
				if (	window.SVGElement
					&&	event.origin instanceof window.SVGElement
				) {
					
					// jQuery < v3.0's addClass and hasClass do not work on SVG elements.
					// However, $('.tooltipstered') does find elements having the class.
					if (!$origin.hasClass('tooltipstered')) {
						
						var c = $origin.attr('class') || '';
						
						if (c.indexOf('tooltipstered') == -1) {
							$origin.attr('class', c + ' tooltipstered');
						}
					}
					
					// auto-activation of the plugin on the instance
					if ($.inArray('tooltipster.SVG', event.instance.option('plugins')) === -1) {
						event.instance._plugin('tooltipster.SVG');
					}
					
					// if there is no content yet, let's look for a <title> child element
					if (event.instance.content() === null) {
						
						// TODO: when there are several <title> tags (not supported in
						// today's browsers yet though, still an RFC draft), pick the right
						// one based on its "lang" attribute 
						var $title = $origin.find('title');
						
						if ($title[0]) {
							event.instance.content($title.text());
						}
					}
					
					// rectify the geometry if SVG.js and its screenBBox plugin have been included
					event.instance
						._on('geometry', function(event) {
							
							// SVG coordinates may need fixing but we need svg.screenbox.js
							// to provide it. SVGElement is IE8+
							if (window.SVG.svgjs) {
								
								if (!window.SVG.parser) {
									window.SVG.prepare();
								}
								
								var svgEl = window.SVG.adopt(event.origin);
								
								// not all figures need (and have) screenBBox
								if (svgEl && svgEl.screenBBox) {
									
									var bbox = svgEl.screenBBox();
									
									event.edit({
{'fraction_non_alphanumeric': 0.13183198380566802, 'fraction_numerical': 0.002783400809716599, 'mean_word_length': 2.0198624904507256, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '1364059', 'n_tokens_mistral': 1786, 'n_tokens_neox': 1158, 'n_words': 325}