diff --git a/sphinxfortran/fortran_domain.py b/sphinxfortran/fortran_domain.py index 08cae2b..7967270 100644 --- a/sphinxfortran/fortran_domain.py +++ b/sphinxfortran/fortran_domain.py @@ -106,8 +106,13 @@ def add_shape(node, shape, modname=None, nodefmt=nodes.Text): re_name_shape = re.compile(r'(\w+)(\(.+\))?') +# The regular expression to get the different arg fields from :param: +# Make double precision an acceptable type +# re_fieldname_match = re.compile( +# r'(?P\b(?:double precision|\w+)\b(?P\s*\(.*\))?)?\s*(?P\b\w+\b)\s*(?P\(.*\))?\s*(?P\[.+\])?').match +# Accept all types in two words re_fieldname_match = re.compile( - r'(?P\b\w+\b(?P\s*\(.*\))?)?\s*(?P\b\w+\b)\s*(?P\(.*\))?\s*(?P\[.+\])?').match + r'(?P\b\w+ ?(?:\w+)?\b(?P\s*\(.*\))?)?\s*(?P\b\w+\b)\s*(?P\(.*\))?\s*(?P\[.+\])?').match class FortranField(Field):