Skip to content

Commit

Permalink
Working Mode is in Markdown now
Browse files Browse the repository at this point in the history
See whatwg/sg#88. Needs to be merged afterwards.
  • Loading branch information
annevk committed Mar 7, 2020
1 parent cd9c675 commit 45405e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -9,8 +9,6 @@ whatwg.org/sg-policy
whatwg.org/code-of-conduct
whatwg.org/principles
whatwg.org/policies

# Not yet covered by the above, but imported from the same repository
whatwg.org/working-mode

# Ignore generated snapshot logos
Expand Down
5 changes: 5 additions & 0 deletions convert-policy.py
Expand Up @@ -31,6 +31,9 @@ def header_text_to_id(header_text):
header_id = re.sub(punctuation_regexp, '', header_id)
header_id = re.sub(' ', '-', header_id)

if header_id == "anchor-permanence":
return "anchors"

return header_id


Expand Down Expand Up @@ -72,6 +75,8 @@ def postprocess_html(policy_html, template, title):
result = template.replace("@POLICY_GOES_HERE@", result)
result = result.replace("@TITLE_GOES_HERE@", title)
result = add_header_anchors(result)
result = result.replace("<p>EXAMPLE: ", "<p class=\"example\">")
result = result.replace("<p>NOTE: ", "<p class=\"note\">")

return result

Expand Down
1 change: 0 additions & 1 deletion deploy.sh
Expand Up @@ -8,7 +8,6 @@ header() {
header "Importing content from whatwg/sg and making it suitable for whatwg.org"
git clone --depth=1 https://github.com/whatwg/sg sg
./convert-policy.py
mv sg/working-mode whatwg.org/working-mode
rm -rf sg
echo ""

Expand Down

0 comments on commit 45405e6

Please sign in to comment.