Skip to content

Instantly share code, notes, and snippets.

View peterbe__fix_specname_linebreaks.py
import re
from pathlib import Path
def replacer(match):
return f"'{match.groups()[0]} "
FIXES = 0
for file in Path('files/en-us/web/api').rglob('index.html'):
lines = []
with open(file) as f:
View populate-search-index-benchmark-sync.js
const fs = require("fs");
const path = require("path");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
} = require("./content");
View populate-search-index-benchmark-graceful-fs.js
const fs = require("graceful-fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View populate-search-index-benchmark.js
const fs = require("fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View main.css
code[class*="language-"],
pre[class*="language-"] {
color: #000;
background: none;
text-shadow: 0 1px #fff;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
View populate-search-index-benchmark.js
const fs = require("fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View index.md
title slug tags
The MDN project
MDN
Landing
MDN Meta

{{MDNSidebar}}

MDN Web Docs is free-to-use resource on which we document the open web platform. Our mission is to provide developers with the information they need to easily build projects on the web platform.

View default.txt
/en-US/search?q=array 4,368
/en-US/search?q=map 3,091
/en-US/search?q=string 2,676
/en-US/search?q=input 2,531
/en-US/search?q=display 2,070
/en-US/search?q=filter 2,317
/en-US/search?q=slice 2,286
/en-US/search?q=splice 2,233
/en-US/search?q=reduce 2,255
/en-US/search?q=form 2,004
View highlight.py
import sys
import csv
from collections import Counter
csv_file, email = sys.argv[1:]
class color:
PURPLE = "\033[95m"
View default.diff
diff --git a/files/en-us/mdn/index.html b/files/en-us/mdn/index.html
index e006e5247..62d92ecef 100644
--- a/files/en-us/mdn/index.html
+++ b/files/en-us/mdn/index.html
@@ -4,9 +4,8 @@ slug: MDN
tags:
- Landing
- MDN Meta
+sidebar: mdn
---