Giter Club home page Giter Club logo

Comments (7)

theidexisted avatar theidexisted commented on July 30, 2024

This is a bug in elinks, which is an independent program, we spawn subprocess to run elinks and render the HTML pages.

The lastest update for elinks is 2012-10-30, so I would not expect them to fix it.

from stdman.

theidexisted avatar theidexisted commented on July 30, 2024

@jeaye Could you please review this issue?

from stdman.

jeaye avatar jeaye commented on July 30, 2024

I've recently been thinking about trying out https://www.brow.sh/ instead of elinks. It should offer much better rendering, since it just uses a headless Firefox. The only question would be around rendering a full frame to a string and pulling out the content we need. If you're looking for something to dig into, that would be a huge step for stdman's formatting.

from stdman.

theidexisted avatar theidexisted commented on July 30, 2024

@jeaye
Thanks for your guide, I have tried with Browsh, but it can't rend the equation correctly, though it's much better than Elinks

img

from stdman.

theidexisted avatar theidexisted commented on July 30, 2024

I have also tested Browsh for this page:
https://en.cppreference.com/w/cpp/string/basic_string

For the Helper classes section, Browsh rend it as:

 Helper classes                                                                                
        std::hash         (C++11)                                                        
        std::hash       (C++20)                                                        
        std::hash      (C++11)                                                        
        std::hash      (C++11)                                                        
        std::hash        (C++11) hash support for strings                               
        std::hash    (C++20) (class template specialization)                        
        std::hash  (C++20)                                                        
        std::hash (C++20)                                                        
        std::hash (C++20)                                                        
        std::hash   (C++20)   

Which is still not perfect.

For elinks, it generates:

Helper classes                                                                                                                                                            
          std::hash<std::string>                                                                                                                                          
          std::hash<std::u8string>                                                                                                                                        
          std::hash<std::u16string>                                                                                                                                       
          std::hash<std::u32string>                                                                                                                                       
          std::hash<std::wstring>                                                                                                                                         
          std::hash<std::pmr::string>                                                                                                                                     
          std::hash<std::pmr::u8string>                                                                                                                                   
          std::hash<std::pmr::u16string>                                                                                                                                  
          std::hash<std::pmr::u32string>                                                                                                                                  
          std::hash<std::pmr::wstring>   hash support for strings                                                                                                         
          (C++11)                        (class template specialization)                                                                                                  
          (C++20)
          (C++11)                                                                                                                                                         
          (C++11)                                                                                                                                                         
          (C++11)                                                                                                                                                         
          (C++20)                                                                                                                                                         
          (C++20)                                                                                                                                                         
          (C++20)                                                                                                                                                         
          (C++20)                                                                                                                                                         
          (C++20)        

Browsh looks better, but still not ideal.
Of course, this may also be due to the cpprefencen template itself has some problems, I can not copy this paragraph in its original style. When I copy the table and paste, we get the text in mess:

std::hash<std::string>std::hash<std::u8string>std::hash<std::u16string>std::hash<std::u32string>std::hash<std::wstring>std::hash<std::pmr::string>std::hash<std::pmr::u8string>std::hash<std::pmr::u16string>std::hash<std::pmr::u32string>std::hash<std::pmr::wstring>(C++11)(C++20)(C++11)(C++11)(C++11)(C++20)(C++20)(C++20)(C++20)(C++20) | hash support for strings(class
-- | --

from stdman.

jeaye avatar jeaye commented on July 30, 2024

Thanks so much for testing this. It does seem like cppref may be the issue for the the last bit. Copy/paste is always a good test for how things will render in text.

Outside of that, though, browsh does a much nicer job than elinks. Do you see any potential issues in stdman using browsh for generation instead? The only thing I noticed is that browsh is rendering ads; I wonder if we can configure it to use uBlock Origin. If not, we can just cut out that bit of the HTML.

from stdman.

theidexisted avatar theidexisted commented on July 30, 2024

I will make a proposal later, I need to go through the current source code of stdman

from stdman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.