Skip to content

Commit

Permalink
fix: regex
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmink committed Sep 11, 2023
1 parent aef3913 commit 3c759b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zcl_aff_writer.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ CLASS zcl_aff_writer IMPLEMENTATION.

METHOD get_infos_of_values_link.
DATA(link) = values_link.
REPLACE ALL OCCURRENCES OF REGEX `[\s]` IN link WITH `` ##REGEX_POSIX.
REPLACE ALL OCCURRENCES OF PCRE `[\s]` IN link WITH ``.
REPLACE ALL OCCURRENCES OF `data:` IN link WITH ``.
SPLIT link AT '.' INTO TABLE DATA(split_at_point).
IF lines( split_at_point ) = 2.
Expand Down Expand Up @@ -572,8 +572,8 @@ CLASS zcl_aff_writer IMPLEMENTATION.

METHOD get_default_from_link.
DATA(link_to_work_on) = link.
REPLACE ALL OCCURRENCES OF REGEX `(@link|data:)` IN link_to_work_on WITH `` ##REGEX_POSIX.
REPLACE ALL OCCURRENCES OF REGEX `[\s]` IN link_to_work_on WITH `` ##REGEX_POSIX.
REPLACE ALL OCCURRENCES OF PCRE `(@link|data:)` IN link_to_work_on WITH ``.
REPLACE ALL OCCURRENCES OF PCRE `[\s]` IN link_to_work_on WITH ``.
SPLIT link_to_work_on AT '.' INTO TABLE DATA(splitted).
IF validate_default_link( splitted_link = splitted fullname_of_type = fullname_of_type element_type = element_type ) = abap_true.
DATA(default_abap) = splitted[ lines( splitted ) ].
Expand Down Expand Up @@ -665,7 +665,7 @@ CLASS zcl_aff_writer IMPLEMENTATION.
default = default && repeat( val = '0' occ = 6 - strlen( default ) ).
ENDIF.
IF element_description->type_kind = cl_abap_typedescr=>typekind_utclong.
REPLACE REGEX `T|t` IN default WITH ` ` ##REGEX_POSIX.
REPLACE PCRE `T|t` IN default WITH ` `.
ENDIF.
remove_leading_trailing_spaces( CHANGING string_to_work_on = string ).
remove_leading_trailing_spaces( CHANGING string_to_work_on = default ).
Expand Down

0 comments on commit 3c759b2

Please sign in to comment.