Skip to content

Instantly share code, notes, and snippets.

View bcks's full-sized avatar

John Emerson bcks

View GitHub Profile
@bcks
bcks / htmldiff.js
Created January 31, 2021 14:57
htmldiff
(function() {
var Match, calculate_operations, consecutive_where, create_index, diff, find_match, find_matching_blocks, html_to_tokens, is_end_of_tag, is_start_of_tag, is_tag, is_whitespace, isnt_tag, op_map, recursively_find_matching_blocks, render_operations, wrap;
is_end_of_tag = function(char) {
return char === '>';
};
is_start_of_tag = function(char) {
return char === '<';
};
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Calendar of Police Killings</title>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<style>
body { font-family: 'Fira Sans'; text-align: center; }