gitlocalize / feedback

:mega: We love feedback :sparkles:
20 stars 8 forks source link

Two paragraph in original are treated as single segment #58

Closed funkill closed 5 years ago

funkill commented 5 years ago

Summary

Two paragraph separated by empty line in markdown file are treated as single segment. In translation we write two paragraph like in original, but after synchronization GitLocalize duplicate second paragraph and asks to resolve conflicts.

Steps to reproduce

  1. Open repo page.
  2. Found paragraph
    
    One such example is using a crate that extends standard `assert!` macros.

File Cargo.toml:



### Repository URL

https://gitlocalize.com/repo/2509/ru/rust-by-example/src/testing/dev_dependencies.md

### What is the current *bug* behavior?

Two paragraph treated as single segment

### What is the expected *correct* behavior?

Two paragraph treated as two segments
svasilenkov commented 5 years ago

After investigating the cause of the problem:

  1. The paragraph starting with "One such example..." and ending with "Cargo.toml:" is treated as one paragraph due to CommonMark specification. If you would like this block of text to be treated as two paragraphs and as a result two segments you should add extra new line after "assert! macros." text.

  2. Extra "<br />" tag is added after "assert! macros." text because of 2 space chars at the end of the line in the original text. That's how CommonMark parser works at the moment. To avoid adding extra tag you can remove space chars at the end of the line.

funkill commented 5 years ago

Oh, yes, sorry, i have a mistake: i don't looked to original source text