typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
13 stars 0 forks source link

Web app text editor does not show the same text as internally stored(?) #231

Closed mhavos closed 11 months ago

mhavos commented 11 months ago

Description

Replacing newlines with spaces or otherwise merging lines seems to have unpredictable and confusing effect on the text editor.

Example

Screencast from 06.12.2023 23:41:05.webm

Steps to reproduce

  1. Paste the following text into a new file:
    ἐβουλεύετό ποτε ὁ Ἡρακλῆς περὶ τοῦ βίου ὧδέ πως· “τί χρὴ ποιεῖν; αἱρήσομαι
    τὴν δι’ ἀρετῆς ὁδόν, ἢ [“or”] τὴν ἑτέραν;” γυναῖκες δὲ δύο [“two”] πρὸς αὐτὸν
    ἦλθον, ἡ μὲν [supply participle “being”] σώφρων καὶ εὐγενής, ἡ δὲ χαρίεσσα ἀλλὰ
    πονηρά. ἔπειθον δὲ τὸν ἄνδρα ἐν μέρει· αὕτη μὲν “ἐμὲ,” ἔφη, “φίλην ποιήσασθαί
    σε χρή· τὴν γὰρ ἡδεῖάν τε καὶ ῥᾳδίαν ὁδὸν ἄξω σε, καὶ τὰ μὲν γλυκέα πάντα
    ἕξεις, τὰ δὲ χαλεπὰ πάντα φεύξῃ.” καὶ ὁ Ἡρακλῆς “ὦ γύναι,” ἔφη, “ὄνομά σοι
    τί ἐστιν;” ἡ δ’ “οἱ μὲν ἐμοὶ φίλοι,” ἔφη, “καλοῦσί με Εὐδαιμονίαν [“Happy Pros-
    perity”], οἱ δ’ ἄλλοι Κακίαν [“Vice”].” ἡ δ’ ἑτέρα γυνὴ εἶπεν· “ἡ ὁδὸς ἣν ἐγώ σε
    ἑλέσθαι φημὶ δεῖν οὔτε βραχεῖα οὔτ’ ἀσφαλὴς οὔτε ῥᾳδία. ἀλλ’ οὐκ ἔξεστι ἄνδρα
    ἀληθῶς καλὸν καὶ ἀγαθὸν γενέσθαι ἄνευ [“without,” + gen.] πόνων. χαλεπὰ γὰρ
    τὰ καλά, ἀλλ’ ἐπαινέσονταί σε πάντες οἱ ἄνθρωποι καὶ πάντες οἱ θεοί.” ταύτῃ δὲ
    τὸ ὄνομα ἦν Ἀρετή.
  2. Start replacing newlines with spaces

Reproduction URL

No response

Browsers

Firefox

OS

Linux

laurmaedje commented 11 months ago

Most probably this had the same cause as #230, which we've identified and fixed since. I'm going to close this to, but if you still experience this, please tell us.