টীকা: সংরক্ষণ করার পর, পরিবর্তনসমূহ তৎক্ষণাৎ নাও দেখাতে পারে। আপনার ব্রাউজারের ক্যাশ কিভাবে এড়াবেন তা জানতে এখানে ক্লিক করুন।
  • ফায়ারফক্স / সাফারি: Shift ধরে রাখা অবস্থায়পুনঃলোড করুন-এ ক্লিক করুন, অথবা Ctrl-F5 বা Ctrl-R (ম্যাক-এ ⌘-R) চাপুন
  • গুগল ক্রোম: Ctrl-Shift-R (ম্যাক-এ ⌘-Shift-R) চাপুন
  • ইন্টারনেট এক্সপ্লোরার: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 চাপুন
  • অপেরা: মেনু → ব্যবস্থাপনাসমূহ-এ যান (ম্যাকে অপেরা → পছন্দসমূহ) এবং এরপর গোপনীয়তা ও সুরক্ষা → ব্রাউজিং-এর তথ্য পরিষ্কার করুন → ক্যাশে করা ছবি ও ফাইলগুলি

অন্যান্য ব্রাউজার সম্পর্কে বিশদ নির্দেশাবলীর জন্য, উইকিপিডিয়া:আপনার ক্যাশে বাইপাস করুন দেখুন।

/* global $, pathoschild */

/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:pathoschild/templatescript.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/i18n/bn.js');
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
	pathoschild.TemplateScript.add([
		{
			name: 'clean up',
			script: function(editor) {
				editor
					// remove trailing whitespace at the end of each line
					.replace(/ \n/g, '\n')

                                        // Digitized by Google (kill)
				        .replace(/Digitized[\s\n]+by[^\n]+\n(Google)?/, '')

					// remove trailing spaces at the end of each line
					.replace(/ +\n/g, '\n')

					// remove trailing whitespace preceding a hard line break
					.replace(/ +<br *\/?>/g, '<br />')

					// remove trailing whitespace at the end of page text
					.replace(/\s+$/g, '')

					// remove trailing spaces at the end of refs
					.replace(/ +<\/ref>/g, '</ref>')

					// remove trailing spaces at the end of template calls
					.replace(/ +}}/g, '}}')

					// join words that are hyphenated across a line break
					// (but leave "|-" table syntax alone)
					.replace(/([^\|])-\n/g, '$1')

					// remove unwanted spaces around punctuation marks
					.replace(/ ([);:\।?!,])/g, '$1')
						
					// remove unwanted spaces around ॥
					.replace(/ ([॥])/g, '$1')

					// – to —
					.replace(/–/g, '—')

					// ।। to ॥
					.replace(/।।/g, '॥')

					// remove unwanted spaces around Bengali diactics marks
					.replace(/ ([া ি ী ু ূ ৃ ে ৈ ো ৌ])/g, '$1')

                                        // remove unwanted spaces around Bengali ঁা diactics marks
					.replace(/ ঁা/g, '$1')

					// replace র্তা with তাঁ at the beginning of words like তাঁর তাঁহার etc 
					.replace(/ র্তা/g, ' তাঁ')

                                        // replace তঁা with তাঁ at the beginning of words like তাঁর তাঁহার etc 
					.replace(/ তঁা/g, ' তাঁ')

					// replace য়৷ with য়া
					.replace(/য়৷/g, 'য়া')

					// convert double-hyphen to mdash (avoiding breaking HTML comment syntax)
					.replace(/([^\!])--([^>])/g, '$1—$2')
					
					// remove trailing whitespace at the end of input
					.replace(/\s+$/g, '');

				       // stuff to do only if the page doesn't contain a <poem> tag:
				       if (editor.get().indexOf("<poem>") != -1) {
					editor
				          // remove single line breaks; preserve multiple.
					     .replace(/([^>\n])\n([^<\n])/g, '$1 $2')
				          // collapse sequences of spaces into a single space
					     .replace(/  +/g, ' ');


				}
					
			}
		}
	]);
});
// </nowiki>