Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML to Markdown is wrong for lists of lists #903

Closed
martinratinaud opened this issue Aug 18, 2022 · 4 comments · Fixed by OpenTermsArchive/turndown#2
Closed

HTML to Markdown is wrong for lists of lists #903

martinratinaud opened this issue Aug 18, 2022 · 4 comments · Fixed by OpenTermsArchive/turndown#2

Comments

@martinratinaud
Copy link
Member

As found in OpenTermsArchive/p2b-compliance-declarations#113

lists are translated incorrectly and give

6.  **chapter 6**.
    
    1.  **subchapter i**. looks ok ...
        
7.  **Chapter 7**. with no subchapter seems ok too
        
8.  **Chapter 8**.
    
    1.  **Entire Agreement**. still ok

9.  **Chapter 9**.
    
    1.  **Entire Agreement**. still ok

10.  **Chapter 10**.
    
    1.  **Entire Agreement**. not ok anymore
 
11.  **Chapter 11**.
    
    1.  **Entire Agreement**. not ok anymore

instead of

6.  **chapter 6**.
    
    1.  **subchapter i**. looks ok ...
        
7.  **Chapter 7**. with no subchapter seems ok too
        
8.  **Chapter 8**.
    
    1.  **Entire Agreement**. still ok

9.  **Chapter 9**.
    
    1.  **Entire Agreement**. still ok

10. **Chapter 10**.
    
    1.  **Entire Agreement**. not ok anymore
 
11. **Chapter 11**.
    
    1.  **Entire Agreement**. not ok anymore

(Note the additional space after 10. and 11.

You can retrieve the problematic html with

wget https://www.mturk.com/participation-agreement -O participation-agreement.html
@martinratinaud
Copy link
Member Author

I just tested the update of turndown and also this PR mixmark-io/turndown#358

but it does not work, we will have either to

  • switch library (which might generate new versions on many documents if some other changes exist)
  • fix this abandoned library

Let's discuss on next planif

@MattiSG MattiSG changed the title HTML to MARKDOWN is wrong for lists of lists HTML to Markdown is wrong for lists of lists Aug 19, 2022
@martinratinaud
Copy link
Member Author

I reopen as it won't be fixed until this fork is actually included into the core

Ndpnt added a commit that referenced this issue Sep 20, 2022
Currently hosted on the @OpenTermsArchive account, until our PRs are
merged on the original repository

Fix:
- #917
- #903
@Ndpnt Ndpnt mentioned this issue Sep 20, 2022
Ndpnt added a commit that referenced this issue Sep 20, 2022
Currently hosted on the @OpenTermsArchive account, until our PRs are
merged on the original repository

Fix:
- #917
- #903
Ndpnt added a commit that referenced this issue Sep 20, 2022
Currently hosted on the @OpenTermsArchive account, until our PRs are
merged on the original repository

Fix:
- #917
- #903
@MattiSG
Copy link
Member

MattiSG commented Apr 24, 2023

According to mixmark-io/turndown#419 (comment), it is very unlikely OpenTermsArchive/turndown#2 will ever be merged into upstream.

The alternative suggested by the library author is to use a custom rule. This would indeed be a more perennial approach than maintaining our own fork.

@MattiSG
Copy link
Member

MattiSG commented Sep 3, 2023

The issue described has been fixed in #943, the technical improvement to make this fix perennial is now described in #1019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants