Skip to content

Need an option to keep no newline message #20

@tengattack

Description

@tengattack

Hi, I'm developing a GitHub CI program by using this package.

However, I faced this problem: I can't calculate the position precisely when the original source file has no newline in the end. The position parameter is defined in here.

diff --git a/foo.php b/foo.php
index 88f2483c..b58d7b34 100644
--- a/foo.php
+++ b/foo.php
@@ -1,6 +1,4 @@
-<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <i>
-    <?php
-    echo $dm->text;
-    ?>
-</i>
\ No newline at end of file
+    <d p="<?= $dm->p ?>"><?= \yii\bootstrap\Html::encode($dm->text) ?></d>
+</i>

In the hunk.Body we has no \ No newline at end of file message so that I couldn't figure out the right position for the new lines after that message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions