diff --git a/pycomment/emit.py b/pycomment/emit.py
index e236056..7cb41e3 100644
--- a/pycomment/emit.py
+++ b/pycomment/emit.py
@@ -10,16 +10,17 @@ def emit(
     *,
     result_map: t.Dict[str, t.List[str]],
     rest: t.List[str],
-    out: t.IO = sys.stdout
+    out: t.IO = sys.stdout,
+    _rx=re.compile(COMMENT_MARKER + ".*$"),
+    _padding_rx=re.compile("^[ 	]*"),
 ) -> None:
     i = 0  # xxx
-    rx = re.compile(COMMENT_MARKER + ".*$")
     itr = PushBackIterator(enumerate(rf, 1))
     for lineno, line in itr:
         if line.rstrip() == STDOUT_HEADER_MARKER:
             break
 
-        m = rx.search(line)
+        m = _rx.search(line)
         k = str(lineno)
         if m is None or k not in result_map:
             print(line, end="", file=out)
@@ -28,11 +29,11 @@ def emit(
             if len(comments) == 1:
                 print(line[: m.start()] + COMMENT_MARKER, comments[0], file=out)
             else:
-                print(
-                    line[: m.start()] + COMMENT_MARKER,
-                    "multi-line..",
-                    file=out,
-                )
+                print(line[: m.start()] + COMMENT_MARKER, "multi-line..", file=out)
+                padding = ""
+                m = _padding_rx.match(line)
+                if m is not None:
+                    padding = m.group(0)
 
                 for lineno, line in itr:
                     if not line.startswith("# "):
@@ -42,8 +43,8 @@ def emit(
                         break
 
                 for comment in comments:
-                    print("#", comment, file=out)
-                print("# ..multi-line", file=out)
+                    print(f"{padding}# {comment}", file=out)
+                print(f"{padding}# ..multi-line", file=out)
             i += 1
 
     if rest:

indentation with multi-line output
rel #1 
diff --git a/pycomment/tests/test_emit.py b/pycomment/tests/test_emit.py
index 503eca9..8d1abc7 100644
--- a/pycomment/tests/test_emit.py
+++ b/pycomment/tests/test_emit.py
@@ -92,6 +92,37 @@ class Tests(unittest.TestCase, AssertDiffMixin):
                     """
                 ).strip(),
             ),
+            C(
+                msg="multi-line with indent",
+                code=textwrap.dedent(
+                    """
+                    def run():
+                        from pycomment.tests._fakearray import arange
+                        arange(9).reshape((3, 3))  # =>
+                    run()
+                    """
+                ).strip(),
+                comments={
+                    "3": [
+                        "array([[0, 1, 2],",
+                        "       [3, 4, 5],",
+                        "       [6, 7, 8]])",
+                    ]
+                },
+                stdout=[],
+                want=textwrap.dedent(
+                    """
+                    def run():
+                        from pycomment.tests._fakearray import arange
+                        arange(9).reshape((3, 3))  # => multi-line..
+                        # array([[0, 1, 2],
+                        #        [3, 4, 5],
+                        #        [6, 7, 8]])
+                        # ..multi-line
+                    run()
+                    """
+                ).strip(),
+            ),
         ]
 
         for c in cases:

pip install -e .[dev]
parse_log_pytest
pytest
pytest black
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
black==22.8.0
certifi==2021.5.30
click==8.0.4
dataclasses==0.8
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
mypy-extensions==1.0.0
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pathspec==0.9.0
platformdirs==2.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
-e git+https://github.com/podhmo/pycomment.git@abb7d151fd8edc68d15887b1536cdb6c73e0cc9f#egg=pycomment
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
typed-ast==1.5.5
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: pycomment
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - black==22.8.0
      - click==8.0.4
      - dataclasses==0.8
      - mypy-extensions==1.0.0
      - pathspec==0.9.0
      - platformdirs==2.4.0
      - tomli==1.2.3
      - typed-ast==1.5.5
prefix: /opt/conda/envs/pycomment

pycomment/tests/test_emit.py::Tests::test_it
pycomment/emit.py
pycomment/emit.py