Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Text overrides restored file due to trailing newline

オープン
#9,077 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript
領域
frontend

調査の方向性

Viewer が使用する SaveService と serializer の経路から始め、内容が末尾の改行で終わる Markdown ファイルで問題を再現します。変更されていないファイルを開いても新しいバージョンが作成されなくなり、シリアライズによって末尾の改行が保持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Describe the bug
Text auto saves unchanged file upon opening, no editing, due to a normalizer behavior. See videos:

To Reproduce
From the video, you need to restore a file and needs to have one specific thing, a trailing newline::

  1. restored version : 150 bytes, tail "...old line :)\n\n🌴\n"
  2. what Text wrote : 149 bytes, tail "...old line :)\n\n🌴"
  3. first difference at byte 149: restored "\n" vs written ""

Expected behavior
The serialiser should preserve a trailing newline, or SaveService should not write when the only difference is its own normalization. It's easy to demonstrate without Notes at all - put a markdown file ending in a newline in Files, open it in the Viewer, don't touch it, and a version appears within ~10 seconds.

Screenshots

https://github.com/user-attachments/assets/cdc53c60-243d-4400-994f-3647ead032f5

https://github.com/user-attachments/assets/9fbbed38-6bf2-4e17-afca-32a066ab50d1

Server details:

  • Nextcloud version: master
  • PHP Version: -
  • Database: -
  • I use the docker dev setup

Client details:

  • OS: Win11pro
  • Browser: FF
  • Browser version: 153.0.4
  • Device: Desktop
Logs
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
主要言語
JavaScript
スター
665
フォーク
133
平均マージ
1日 17時間
マージ済み PR(30日)
172

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/text のほかの issue

nextcloud/text の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。