Coder Social home page Coder Social logo

Comments (3)

noties avatar noties commented on August 19, 2024 1

@GlennNZ It was actually an easy fix, changes are merged into develop

from markwon.

noties avatar noties commented on August 19, 2024

Hey!

I have looked into it and it's definitely a bug. Let me explain: there is a simple check in some of the spans, something like this:

public void drawLeadingMargin(Canvas c, Paint p, int x, int dir, int top, int baseline, int bottom, CharSequence text, int start, int end, boolean first, Layout layout) {
    if (this.start != start) {
        return;
    }
}

this.start is a value that is passed by AST visitor indicating current parsing position. As there are multiple parsing operations, each line will hold own indexes (starting with 0), but when all lines are set to a TextView, TextView will pass own indexes (starting with the very first character). So, this explains why list is rendered correctly if applied first.

There is such a check in the first place in order to not draw a bullet on each line if a line is too big and was split (span's drawLeadingMargin would be called for each such line).

Thanks for the issue, I will think of what can be done with it for the next release πŸ‘

from markwon.

GlennNZ avatar GlennNZ commented on August 19, 2024

We just got your develop branch going with our project and verified that all is well. Thanks for that.

from markwon.

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.