Skip to content

Make :after more usefull #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

sulaweyo
Copy link
Contributor

If :match and :after is defined, only the :match value is honored which leads to appends at the end of the file even if an appropriate location was defined via :after. This change adds an if to switch over to the :after method for insertion if no match was found but an :after is defined.

Added an if to not just append the line if :match and :after are defined but match delivers no matches. 
If the line exists it will work as before but if not it will not be appended but added at the :after position.
@adidenko
Copy link

#317 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants