From dfbc0b2878b2933a41ea22834a2301f90767b932 Mon Sep 17 00:00:00 2001
From: Aleteoryx
Date: Sun, 31 Aug 2025 16:57:56 -0400
Subject: [PATCH] multiline links, see also edits
---
README.md | 2 +-
gloss.py | 19 +++++++++++++------
markup.c | 21 +++++++++++++++++++++
roughspec | 27 +++++++++++++++++++++++++++
4 files changed, 62 insertions(+), 7 deletions(-)
create mode 100644 roughspec
diff --git a/README.md b/README.md
index 8b6b5207b751416e1d0898a2c6b1ebafafca6b6a..1caa45f7117a2b91715713a2e512bb8a6be65a09 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ if `@@` is omitted, the signature will have no time associated.
if `//` is omitted, the signature will have no URL associated.
within a block, one can write a link of the form ``, or ``.
-one can also escape `<` and `>` with backslashes.
+one can also escape `<` and `>` with backslashes. regions of text can be italicized by putting them `/in slashes/`.
if a block begins with `***`, the "see also" section is entered.
each subsequent non-empty line should be the slug (filename, minus .gls) of an article.
diff --git a/gloss.py b/gloss.py
index 21bc8a17a44f647bb11072cd7be931311859eea3..6990f2357a702f67e9b90af30683a91c15aa9da6 100755
--- a/gloss.py
+++ b/gloss.py
@@ -22,6 +22,7 @@ interpolated as in str.format, and the following keys are provided:
{{title}} - The first name for an article.
{{slug}} - The name of the output file, minus '.html'.
{{body}} - The HTML content of an article.
+ {{see_also}} - The HTML content of the "See also" section.
{{modtime}} - The datetime of the article's last edit.
'''[1:]
@@ -236,9 +237,9 @@ def gen_inner_html(fmt, file, idx):
content += f', {date}'
content += '
'
content +='\n'
-
+
if file.see_also is not None and len(file.see_also) != 0:
- content += "\n\n
See Also:
\n
"
+ see_also = "
See also:
\n
"
for what in file.see_also:
if what in idx.by_slug:
page = idx.by_slug[what]
@@ -253,10 +254,12 @@ def gen_inner_html(fmt, file, idx):
href, name = what.split('|', 1)
else:
href = name = what
- content += f"\n\t