Permalink
Browse files

Fix <a> detection bug by making the regex for topics stricter.

  • Loading branch information...
Andy Chu
Andy Chu committed Dec 28, 2017
1 parent b24e8df commit 34508c8adbb5a1a74f67a8203a83922230ceee8b
Showing with 4 additions and 4 deletions.
  1. +1 −1 build/quick_ref.py
  2. +3 −3 doc/osh-quick-ref-toc.txt
View
@@ -17,7 +17,7 @@
# 2. lower-case or upper-case topic
# 3. Optional: A SINGLE space, then punctuation
TOPIC_RE = re.compile(r'\b(X[ ])?\@?([a-zA-Z0-9_\-]+)([ ]\S+)?', re.VERBOSE)
TOPIC_RE = re.compile(r'\b(X[ ])?\@?([a-z\-]+|[A-Z0-9_]+)([ ]\S+)?', re.VERBOSE)
# Sections have alphabetical characters, spaces, and '/' for I/O. They are
# turned into anchors.
@@ -88,16 +88,16 @@ X [Prompts] PS1 PS2
X [select] PS3
[xtrace] PS4
[Shell Options] X SHELLOPTS X BASHOPTS
[Other] HOME IFS
[Other] HOME PATH IFS
SPECIAL VARIABLES
X [Platform] HOSTNAME OSTYPE BASH_VERSION @BASH_VERSINFO
X [Call Stack] @BASH_SOURCE @FUNCNAME @BASH_LINENO
@BASH_ARGV @BASH_ARGC LINENO
[Process State] X BASHPID X PPID UID EUID
X [Process Stack] BASH_SUBSHELL SHLVL
X [Shell State] BASH_CMDS DIRSTACK
[cd] PWD OLDPWD
X [Shell State] BASH_CMDS @DIRSTACK
[cd] PWD OLDPWD X CDPATH
[getopts] OPTIND OPTARG X OPTERR
[read] REPLY IFS
[Functions] X RANDOM X SECONDS

0 comments on commit 34508c8

Please sign in to comment.