Code Monkey home page Code Monkey logo

cobalt's Issues

换行的问题

我这里使用的是1.2.3版本,查看了源码考虑是换行符的处理问题

在BookTextService.java文件中考虑用DataCenter.textContent = getText(content); 替换 DataCenter.textContent = content.text();

private static String getText(Element parentElement) {
        StringBuilder working = new StringBuilder();
        for (Node child : parentElement.childNodes()) {
            if (child instanceof TextNode) {
                working.append(((TextNode) child).text());
            }
            if (child instanceof Element) {
                Element childElement = (Element) child;
                // do more of these for p or other tags you want a new line for
                if (childElement.tag().getName().equalsIgnoreCase("br")) {
                    working.append("\n");
                }
                working.append(getText(childElement));
            }
        }

        return working.toString();
    }

另:我本地代码还是1.2.2的,是1.2.3版本代码还没有上传吗,谢谢

导入书籍失败

试了很多epub和txt都不行,epub用SumatraPDF可以正常打开阅读

idea的版本是2024.1

update: 把idea更新到2024.1.2也不行

卡卡卡

按哪都卡,下一章卡,跳转卡,滚动卡
大佬抽空弄弄呗

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.