We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2afb6a5 commit e159c5dCopy full SHA for e159c5d
1 file changed
great_docs/assets/post-render.py
@@ -196,15 +196,16 @@ def extract_seealso_from_html(html_content):
196
Returns a list of referenced item names, or empty list if none found.
197
"""
198
# Match %seealso in <p> tags (most common after markdown rendering)
199
+ # This handles both standalone %seealso and when it follows other directives
200
p_pattern = re.compile(
- r"<p>\s*%seealso\s+([^<]+)</p>",
201
+ r"<p>[^<]*%seealso\s+([^<%]+?)(?:%|</p>)",
202
re.IGNORECASE,
203
)
204
- # Match standalone %seealso lines
205
+ # Match standalone %seealso lines (not in HTML tags)
206
standalone_pattern = re.compile(
- r"^\s*%seealso\s+(.+?)\s*$",
207
- re.MULTILINE | re.IGNORECASE,
+ r"%seealso\s+([^\n%<]+)",
208
+ re.IGNORECASE,
209
210
211
# Try <p> pattern first
0 commit comments