[latex3-commits] [git/LaTeX3-latex3-pdfresources] master: improve regex (b7802ec)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Apr 2 19:37:23 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : master
Link       : https://github.com/latex3/pdfresources/commit/b7802ecee22e54be72cd8afa8975313e37465b32

>---------------------------------------------------------------

commit b7802ecee22e54be72cd8afa8975313e37465b32
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Apr 2 19:37:23 2020 +0200

    improve regex


>---------------------------------------------------------------

b7802ecee22e54be72cd8afa8975313e37465b32
 hgeneric-experimental.def | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index c69bfac..40ea3cf 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -196,18 +196,18 @@
 \regex_const:Nn \c__hyp_dest_view_regex
   {
     \A\ *
-     (XYZ (\ +\d+|\d*\.\d+){0,3}
-     |
-     (Fit|FitB)
-     |
-     (FitH|FitV|FitBH|FitBV)(\ +\d+|\d*\.\d+){1}
-     |
-     FitR (\ +\d+|\d*\.\d+){4}
+     (?:
+      (?:XYZ (?:\ +(?:(?:\d+|\d*\.\d+)|null)){0,3})
+      |
+      (?:Fit|FitB)
+      |
+      (?:(?:FitH|FitV|FitBH|FitBV)(?:\ +(?:\d+|\d*\.\d+)|null)??)
+      |
+      (?:FitR (?:\ +\d+|\d*\.\d+){4})
      )
      \ *\Z
   }
 
-
 % this need sorting out later. pdf standards should be handled outside the driver.
 % pdfa forces the flag /F 4 in some places.
 \AtBeginDocument





More information about the latex3-commits mailing list.