Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Line Breaks
- SEARCH
- for legal and illegal forms of HTML Line Break Tag. Open tag, closing tag, self-closing tag. Allow whitespace before and after 'br' Tag ID. Allow whitespace before opening Tag Delimiter (<) and after closing Tag Delimiter (>).
- Wikimedia Tag Parser has funny rules for an HTML Line Break Tag. No matching Begin/End tags (<br></br>). Either Begin or End tag alone counts as a Line Break Tag. After normal start to tag (<br or </br), almost anything goes until closing '>'. Including a text Line Break!
- \s*<\/?br(\s*[^|{}]*)?>\s*
- REPLACE
- HTML Line Break Tag with Wikimedia {{break}} template. Replacement string includes a space before opening Template Delimiter ({{) and after closing Template Delimiter (}}).
- {{break | 1}}
- ยง
- Spacing for Pipe Bars (|) in Templates
- SEARCH
- for Pipe Bars (|), possibly preceded or followed by whitespace. Do not accept a newline character (NL) as whitespace. In practice, accept non-NL whitespace preceding or following a Pipe Bar. In aspiration, reject any string of whitespace that has an NL in it. But it was a lot of work to get the search expression to work as well as it does. Improving the search expression is a task for somewhere between later and never.
- REPLACE
- existent or nonexistent whitespace with nice whitespace
Advertisement
Add Comment
Please, Sign In to add comment