Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Every problem has one primary topic. The prefix is the first part of the file
name; problems that span a few areas pick one primary topic and put the rest in
their tags.

<!-- TOPICS:START table (generated from topics.txt by `make topics`) -->
| Prefix | Topic |
|--------|-------|
<!-- TOPICS:START table (generated from topics.txt by `make topics`) -->
| `calc` | Calculus |
| `linalg` | Linear Algebra |
| `alg` | Abstract Algebra |
Expand Down
2 changes: 1 addition & 1 deletion docs/CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ hook, and CI all read it from there, and the tables in the docs are filled in
from it by `make topics`. So to add a topic, edit `topics.txt` and run
`make topics` - don't edit the table below by hand (CI fails if it drifts).

<!-- TOPICS:START table (generated from topics.txt by `make topics`) -->
| Prefix | Topic |
|--------|-------|
<!-- TOPICS:START table (generated from topics.txt by `make topics`) -->
| `calc` | Calculus |
| `linalg` | Linear Algebra |
| `alg` | Abstract Algebra |
Expand Down
4 changes: 3 additions & 1 deletion scripts/sync-topics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ TARGETS=(
# Render the three block formats from topics.txt.
parse() { awk 'NF && $1 !~ /^#/ { name=$0; sub(/^[ \t]*[^ \t]+[ \t]+/, "", name); print $1 "\t" name }' "$TOPICS"; }

table_block=""; dropdown_block=""; prefixes=""
table_block="| Prefix | Topic |
|--------|-------|
"; dropdown_block=""; prefixes=""
while IFS=$'\t' read -r prefix name; do
table_block="$table_block| \`$prefix\` | $name |
"
Expand Down
Loading