Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 858 forks source link

[BUG] Spacing behaving differently between 2.2.1 and 3.0.0-beta.2 #1321

Open danallen88 opened 1 year ago

danallen88 commented 1 year ago

Describe the bug:

Given the below HTML, I am seeing a difference in spacing between <p> elements and <li> elements as seen in the following screenshots.

HTML to reproduce the issue:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
    xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">Description:</span> Red blood cells (RBCs) are the most numerous blood cells and are critical for oxygen delivery and acid-base balance.
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">Decreased Red Blood Cells</span>
            <br />&#160;&#160;&#160;
        </p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Blood Loss</div>
                <ul>
                    <li>Hemorrhage</li>
                    <li>Parasitism</li>
                </ul>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Hemolysis</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Immune-mediated red blood cell destruction</div>
                        <ul>
                            <li>Primary immune-mediated hemolytic anemia (IMHA)</li>
                            <li>Secondary IMHA
                                <ul>
                                    <li>Infection</li>
                                    <li>Neoplasia</li>
                                    <li>Systemic immune-mediated disease</li>
                                    <li>Drugs/vaccines</li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Increased red blood cell destruction (non-immune)</div>
                        <ul>
                            <li>Heinz body anemia
                                <ul>
                                    <li>Toxins</li>
                                    <li>Drugs</li>
                                    <li>Dietary</li>
                                </ul>
                            </li>
                            <li>Mechanical fragmentation (microangiopathic)
                                <ul>
                                    <li>Vasculitis</li>
                                    <li>Intravascular coagulation, both disseminated and local</li>
                                    <li>Hemangiosarcoma</li>
                                    <li>Heartworm infection</li>
                                </ul>
                            </li>
                            <li>Metabolic</li>
                            <li>Hereditary</li>
                            <li>Envenomation</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Decreased red blood cell production</div>
                <ul>
                    <li>Chronic blood loss</li>
                    <li>Chronic inflammatory disease</li>
                    <li>Reduced erythropoietin</li>
                    <li>Bone marrow suppression</li>
                    <li>Liver disease or portosystemic shunt (PSS)</li>
                    <li>Immune-mediated (targeting RBC precursors)</li>
                    <li>Nutritional deficiencies
                        <ul>
                            <li>Vitamin B12 (cobalamin)</li>
                            <li>Folate</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Idiopathic/multifactorial</div>
                <ul>
                    <li>Infection</li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Neoplasia&#160; &#160;
                            <br />&#160;&#160;&#160;
                        </div>
                    </li>
                </ul>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">&#160; &#160;Next Steps and Related Findings for Decreased Red Blood Cells</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>Blood Loss:</li>
            <ul>
                <li>
                    <div style="margin-top: 0px; margin-bottom: 0px;">CBC:</div>
                    <ul>
                        <li>Initially increased MCV and RDW with regeneration, then developing microcytosis (decreased MCV) and hypochromasia (decreased MCHC) with severe or continued blood loss</li>
                        <li>Reticulocytes: initially elevated, but then decreased as iron deficiency develops</li>
                        <li>Decreased reticulocyte hemoglobin (RETIC-HGB)</li>
                        <li>Platelets - variably decreased (consumption)</li>
                        <li>Inflammatory leukogram</li>
                    </ul>
                </li>
                <li>
                    <div style="margin-top: 0px; margin-bottom: 0px;">Iron panel:</div>
                    <ul>
                        <li>Decreasing total serum iron concentration and serum ferritin</li>
                        <li>Normal to increasing total iron binding capacity (transferrin) with progression</li>
                    </ul>
                </li>
                <li>Chemistry:
                    <ul>
                        <li>Decreased total protein and/or albumin</li>
                    </ul>
                </li>
                <li>
                    <div style="margin-top: 0px; margin-bottom: 0px;">Next steps to evaluate for causes of blood loss:</div>
                    <ul>
                        <li>Positive fecal ova and parasite screen, Fecal Dx
                            <span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">&#8482;</span>&#160;antigen, fecal occult blood
                        </li>
                        <li>Urinalysis: hematuria, transitional epithelial cells on urine cytology</li>
                        <li>Abnormal coagulation tests:
                            <ul>
                                <li>Increased prothrombin time (PT) and activated partial thromboplastin time (APTT)</li>
                                <li>Prolonged buccal mucosal bleeding time</li>
                                <li>Low von Willebrand factor concentration</li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Immune-mediated hemolytic anemia</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">CBC:</div>
                        <ul>
                            <li>Decreased hematocrit, hemoglobin, MCHC and MCH</li>
                            <li>Increased MCV and RDW</li>
                            <li>Increased reticulocytes +/- nucleated RBCs</li>
                            <li>Platelets decreased if concurrent immune-mediated thrombocytopenia (Evan's syndrome)</li>
                            <li>Inflammatory leukogram</li>
                            <li>Decreased reticulocyte hemoglobin (RETIC-HGB)</li>
                            <li>Spherocytosis (in dogs) and/or blood parasites may be seen on blood film review</li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Positive Coombs or saline agglutination test</div>
                    </li>
                    <li>Chemistry: increased serum bilirubin</li>
                    <li>Urinalysis: bilirubinuria +/- hemoglobinuria</li>
                    <li>Increased C-reactive protein (CRP)</li>
                    <li>Next steps to evaluate for causes of secondary IMHA:
                        <ul>
                            <li>Assess for history of recent vaccination or medication</li>
                            <li>Serology, PCR or antigen testing positive for infectious causes (e.g. anaplasmosis, ehrlichiosis, FeLV, FIV, hemotropic&#160;
                                <em>Mycoplasma</em>, babesiosis, cytauxzoonosis)
                            </li>
                            <li>Positive antinuclear antibody (ANA) titer</li>
                            <li>Assess thoracic and abdominal imaging for neoplasia</li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Primary IMHA is a diagnosis of exclusion of secondary causes.</div>
                    </li>
                </ul>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Heinz body anemia (oxidative injury)</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">CBC:</div>
                        <ul>
                            <li>Decreased hematocrit, hemoglobin, MCHC and MCH</li>
                            <li>Increased MCV and RDW</li>
                            <li>Increased reticulocytes</li>
                            <li>Increased nucleated RBCs</li>
                            <li>Decreased reticulocyte hemoglobin (RETIC-HGB)</li>
                            <li>Inflammatory leukogram</li>
                            <li>Blood film review: Heinz bodies, target cells, basophilic stippling, polychromasia +/- mild spherocytosis</li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Chemistry:</div>
                        <ul>
                            <li>Increased serum bilirubin</li>
                            <li>Increased ALP, AST, +/- GGT, ALT</li>
                            <li>Intravascular hemolysis noted (red color to serum)</li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Urinalysis:</div>
                        <ul>
                            <li>Hemoglobinuria</li>
                            <li>Bilirubinuria</li>
                            <li>Proteinuria</li>
                        </ul>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Next steps to evaluate for causes of Heinz body anemia:</div>
                        <ul>
                            <li>Increased zinc concentration</li>
                            <li>Abdominal radiographs may reveal gastrointestinal metallic foreign body</li>
                            <li>History of exposure to drugs or dietary causes of Heinz body anemia, e.g.:
                                <ul>
                                    <li>Onions</li>
                                    <li>Garlic</li>
                                    <li>Propylene glycol</li>
                                    <li>Acetominophen (dogs and cats)</li>
                                    <li>Phenothiazine (horses)</li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>Anemia of chronic inflammatory disease (causing iron sequestration)</li>
            <ul>
                <li>CBC:
                    <ul>
                        <li>Mild to moderate, stable anemia</li>
                        <li>+/- microcytosis</li>
                        <li>Hypochromasia (uncommon)</li>
                        <li>Decreased reticulocyte hemoglobin (RETIC-HGB)</li>
                        <li>Inflammatory leukogram</li>
                    </ul>
                </li>
                <li>Chemistry:
                    <ul>
                        <li>Increased total protein and globulins</li>
                        <li>Decreased albumin</li>
                    </ul>
                </li>
                <li>Increased C-reactive protein (CRP)</li>
                <li>Iron Panel:
                    <ul>
                        <li>Decreased total serum iron concentration and iron binding capacity (transferrin)</li>
                        <li>Increased serum ferritin</li>
                    </ul>
                </li>
                <li>Next steps to evaluate for evidence of underlying causes of inflammation:
                    <ul>
                        <li>Immune-mediated diseases:
                            <ul>
                                <li>CBC:
                                    <ul>
                                        <li>Spherocytosis (if IMHA)</li>
                                        <li>RBC agglutination (if IMHA)</li>
                                        <li>Severe thrombocytopenia (if ITP)</li>
                                    </ul>
                                </li>
                                <li>Coombs - positive if IMHA</li>
                                <li>Anti-nuclear antibody (ANA) tests - variably positive</li>
                                <li>Joint fluid cytology - neutrophilic inflammation if immune-mediated polyarthritis</li>
                            </ul>
                        </li>
                        <li>Systemic infection:
                            <ul>
                                <li>PCR, serology or antigen tests - positive for infectious diseases (e.g. Lyme, ehrlichiosis, leptospirosis, systemic fungal, heartworm, etc.)</li>
                            </ul>
                        </li>
                        <li>Chronic localized inflammation or infection:
                            <ul>
                                <li>Diagnostic imaging (radiographs and/or ultrasound) to assess for localized inflammation or infection</li>
                                <li>Pancreatitis:
                                    <ul>
                                        <li>Spec cPL or Spec fPL Test increased</li>
                                        <li>Amylase and lipase variably increased</li>
                                    </ul>
                                </li>
                                <li>Pyelonephritis:
                                    <ul>
                                        <li>Chemistry - increased SDMA, creatinine and BUN</li>
                                        <li>Urinalysis - active sediment (pyuria, hematuria, bacteriuria, casts)</li>
                                        <li>Urine culture - positive</li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li>Neoplasia
                            <ul>
                                <li>Diagnostic imaging (radiographs and/or ultrasound) to assess for neoplasia</li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
            <li>Decreased erythropoietin production
                <br />
                <ul>
                    <li>CBC:
                        <ul>
                            <li>Normocytic, normochromic anemia</li>
                            <li>Decreased RBC with normal to decreased reticulocytes</li>
                            <li>Normal RDW</li>
                        </ul>
                    </li>
                    <li>Evaluate for underlying causes:
                        <ul>
                            <li>Chronic kidney disease:
                                <ul>
                                    <li>Degree of anemia is relative to severity and chronicity of kidney disease</li>
                                    <li>Chemistry - increased SDMA, creatinine, BUN, phosphorus</li>
                                    <li>Urinalysis:
                                        <ul>
                                            <li>Inappropriate concentration (urine specific gravity &lt; 1.030 in dogs; &lt; 1.035 in cats; &lt; 1.025 in horses)</li>
                                            <li>+/- proteinuria</li>
                                        </ul>
                                    </li>
                                    <li>Urine protein: creatinine ratio - variably increased</li>
                                    <li>Evaluate blood pressure for systemic hypertension</li>
                                </ul>
                            </li>
                            <li>Hypothyroidism:
                                <ul>
                                    <li>Chemistry - increased fasting serum cholesterol and triglycerides</li>
                                    <li>Decreased T4 and free T4, increased cTSH</li>
                                </ul>
                            </li>
                            <li>Hypoadrenocorticism (Addison's disease):
                                <ul>
                                    <li>CBC - normal to increased lymphocytes and eosinophils</li>
                                    <li>Chemistry:
                                        <ul>
                                            <li>Variably decreased sodium and chloride</li>
                                            <li>Variably increased potassium and calcium</li>
                                            <li>Decreased cholesterol and albumin</li>
                                            <li>Variably increased SDMA, creatinine and BUN with secondary decreased renal perfusion and GFR</li>
                                        </ul>
                                    </li>
                                    <li>Adrenal function tests:
                                        <ul>
                                            <li>Decreased resting serum cortisol</li>
                                            <li>Abnormal ACTH stimulation</li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>Bone marrow suppression:
                <ul>
                    <li>Assess history for exposure to drugs, e.g.:
                        <br />
                        <ul>
                            <li>Chemotherapy</li>
                            <li>Estrogen (endogenous or exogenous)</li>
                            <li>Phenylbutazone (dogs and horses)</li>
                            <li>Trimethoprim sulfadiazine/sulfonamide</li>
                            <li>Griseofulvin (cats)</li>
                        </ul>
                    </li>
                    <li>CBC - variable decreases in other cell lines
                        <ul>
                            <li>Thrombocytopenia</li>
                            <li>Leukopenia</li>
                            <li>Absence of regenerative response (normal reticulocytes)</li>
                        </ul>
                    </li>
                    <li>Bone marrow cytology or biopsy to assess for decreased cellularity, neoplastic infiltration, fibrosis, erythrophagocytosis, immune-mediated destruction of erythrocyte precursors, megakaryocytes or other changes</li>
                </ul>
            </li>
            <li>Acute pre-regenerative anemia:
                <ul>
                    <li>Regenerative response can take 3-4 days to become apparent. Decreased reticulocyte hemoglobin (RETIC-HGB) may be an early indicator.</li>
                    <li>Acute blood loss:
                        <ul>
                            <li>Chemistry - low serum total protein</li>
                            <li>Evaluate for evidence of blood loss</li>
                        </ul>
                    </li>
                    <li>Hemolytic disease:
                        <ul>
                            <li>CBC - RBC agglutination, spherocytes</li>
                            <li>Coombs or saline agglutination tests - variably positive</li>
                            <li>Chemistry - increased bilirubin</li>
                            <li>Urinalysis - bilirubinuria +/- hemoglobinuria</li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">Increased Red Blood Cells</span>
            <br />&#160;&#160;&#160;
        </p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Dehydration</div>
            </li>
            <li>Splenic contraction (dogs)</li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Absolute erythrocytosis</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Endocrine</div>
                    </li>
                    <li>Secondary polycythemia</li>
                    <li>Polycythemia vera</li>
                </ul>
            </li>
            <li>Breed-related increases
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Greyhounds, sighthounds, some lines of dachshunds
                            <br />&#160;&#160;&#160;
                        </div>
                    </li>
                </ul>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">&#160; &#160;Next Steps and Related Findings for Increased Red Blood Cells</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Dehydration</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">CBC:</div>
                        <ul>
                            <li>
                                <div style="margin-top: 0px; margin-bottom: 0px;">Mild to moderate increase in hematocrit and RBC</div>
                            </li>
                            <li>Normal red blood cell indices (RDW, MCV, MCHC, MCH)</li>
                            <li>Normal reticulocytes and reticulocyte hemoglobin (RETIC-HGB)</li>
                        </ul>
                    </li>
                    <li>Chemistry:
                        <ul>
                            <li>
                                <div style="margin-top: 0px; margin-bottom: 0px;">Increased total protein and/or albumin</div>
                            </li>
                            <li>
                                <div style="margin-top: 0px; margin-bottom: 0px;">Increased sodium and chloride</div>
                            </li>
                            <li>
                                <div style="margin-top: 0px; margin-bottom: 0px;">Increased SDMA, BUN and creatinine, +/- increased phosphorus</div>
                            </li>
                        </ul>
                    </li>
                    <li>Urinalysis:
                        <ul>
                            <li>Increased specific gravity (&gt;1.030 for dogs, &gt; 1.035 for cats)</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Splenic contraction</div>
                <ul>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">Physiologic response to stress, excitement or exercise seen primarily in dogs</div>
                    </li>
                    <li>
                        <div style="margin-top: 0px; margin-bottom: 0px;">CBC:</div>
                        <ul>
                            <li>
                                <div style="margin-top: 0px; margin-bottom: 0px;">Mild to moderate increase in hematocrit, RBCs and nucleated RBCs</div>
                            </li>
                            <li>Normal red blood cell indices (RDW, MCV, MCHC, MCH)</li>
                            <li>Normal to mildly increased reticulocytes and normal reticulocyte hemoglobin (RETIC-HGB)</li>
                            <li>+/- physiologic leukocytosis (neutrophilia, lymphocytosis)</li>
                            <li>Platelets mildly increased</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>Absolute erythrocytosis</li>
            <ul>
                <li>CBC:
                    <ul>
                        <li>High normal to increased hematocrit</li>
                        <li>Increased reticulocytes and nucleated RBCs</li>
                    </ul>
                </li>
                <li>Endocrine:
                    <ul>
                        <li>Increases in RBC, hemoglobin and hematocrit are typically mild</li>
                        <li>Evaluate for endocrine imbalances:
                            <ul>
                                <li>Hyperthyroidism</li>
                                <li>Hyperadrenocorticism (Cushing's disease)</li>
                                <li>Acromegaly</li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>Secondary polycythemia:
                    <ul>
                        <li>CBC - marked increases in RBC, hemoblobin and hematocrit (typically &gt; 60%)</li>
                        <li>No evidence of dehydration on physical exam, chemistry or urine specific gravity</li>
                        <li>Erythropoeitin (where available) usually increased, but may be normal.</li>
                        <li>Systemic hypoxia:
                            <ul>
                                <li>Thoracic imaging reveals evidence of pulmonary disease, cardiac disease, or right-to-left heart defects</li>
                                <li>History of residence in, or travel to, high altitude</li>
                                <li>Decreased PaO
                                    <sub>2</sub>,&#160;SpO
                                    <sub>2</sub>
                                </li>
                                <li>Increased Cardiopet proBNP test</li>
                            </ul>
                        </li>
                        <li>Inappropriate erythropoietin secretion:
                            <ul>
                                <li>Renal disorders causing localized hypoxia or paraneopastic syndrome</li>
                                <li>Abdominal imaging reveals evidence of kidney abnormalities (e.g. cyst, tumor, hydronephrosis) or extra-renal neoplasia</li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>Polycythemia vera:
                    <ul>
                        <li>CBC:
                            <ul>
                                <li>Marked increases in RBC and hematocrit (typically &gt; 60%)</li>
                                <li>Variably increased platelets</li>
                            </ul>
                        </li>
                        <li>No evidence of dehydration on physical exam, chemistry or urine specific gravity</li>
                        <li>Decreased or normal erythropoietin (where available)</li>
                        <li>No evidence of systemic hypoxemia, endocrine imbalances, kidney anormalities or neoplasia</li>
                        <li>Polycythemia vera is often a diagnosis of exclusion</li>
                    </ul>
                </li>
            </ul>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">Additional Information</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">&#160;&#160; </span>
            <span style="font-weight: bold;">Physiology</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Red blood cells (RBCs, erythrocytes, red cells, red corpuscles) are the longest-lived of the circulating blood cells. They are produced primarily in the bone marrow, but some production can occur at secondary sites (spleen, liver). Red blood cell production is stimulated by erythropoietin which is released from the kidneys.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Red blood cells contain hemoglobin and are critical for cellular respiration, delivering oxygen to tissues and carrying carbon dioxide away.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Red blood cell counts estimate the total red cell mass in a patient.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Red cells are not normally found in body fluids other than blood.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Anemias can be classified as regenerative or nonregenerative based on the adequacy of the bone marrow response to produce new red blood cells or reticulocytes (in all species but the horse). Reticulocytosis typically appears 3-4 days after the onset of anemia, with peak production in 7 days for the dog and 7-14 days for cats.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Anemia is a common clinical problem that may need emergency treatment with transfusion of red blood cell products if acute and/or severe.
                    <br />&#160;&#160;&#160;
                </div>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">&#160;&#160; Diagnostic Methodology</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Red cells are individual counted and sized by automated equipment using electronic impedence (the Coulter principle) or with a combination of laminar flow impedance and laser flow cytometry. Hemocytometers may be used for manual counts.</div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Anemia can be a reduction in the numbers (count) of red blood cells (RBC), the concentration of HGB, or the hematocrit or packed cell volume (PCV).&#160; Decreases in these parameters may not be uniform, owing to differences in reference intervals or to the presence of abnormal RBCs.
                    <br />&#160;&#160;&#160;
                </div>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">
            <span style="font-weight: bold;">&#160;&#160; References</span>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Feldman BF, Zinkl JG, Jain NC, eds. 
                    <span style="font-style: italic;">Schalm's&#160;Veterinary Hematology</span>, 5th ed. Philadelphia, PA:&#160; Lippincott Williams and Wilkins; 2000.
                </div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Nelson RW, Couto CG, eds.&#160;
                    <span style="font-style: italic;">&#160;Small Animal Internal Medi</span>cine, 4th ed.&#160; St. Louis, MO:&#160; Mosby-Elsevier; 2009.
                </div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Latimer KS, Mahaffey EA, Prasse KW, eds.&#160;
                    <span style="font-style: italic;">Duncan and Prasse's Veterinary Laboratory Medicine:&#160; Clinical Pathology</span>, 4th ed. Ames, IA:&#160; Blackwell; 2003.
                </div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Stockham SL, Scott MA.&#160;&#160;
                    <span style="font-style: italic;">Fundamentals of Veterinary Clinical Pathology</span>, 2nd ed.&#160; Ames, IA:&#160; Blackwell; 2008.
                </div>
            </li>
            <li>
                <div style="margin-top: 0px; margin-bottom: 0px;">Willard MD, Tvedten H, eds.&#160;&#160;
                    <span style="font-style: italic;">Small Animal Clinical Diagnosis by Laboratory M</span>ethods, 4th ed.&#160; St. Louis, MO:&#160; Saunders; 2004.
                </div>
            </li>
        </ul>
        <p style="margin-top: 0px; margin-bottom: 0px;">&#160;</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">Last updated 3/1/2019</p>
    </body>
</html>

Html widget configuration:

      Html(
          style: {
            'body': Style.fromTextStyle(textTheme.bodyLarge!).copyWith(
              margin: Margins.zero,
            ),
          },
          data: ...,
        )

Expected behavior: I can't actually tell if something was "fixed" or "broken" here, but it's a clear difference between both versions.

Screenshots:

Before ![before](https://github.com/Sub6Resources/flutter_html/assets/4910808/77941027-524e-4858-b59a-40423ff15aef)
After ![after](https://github.com/Sub6Resources/flutter_html/assets/4910808/f09f5b81-791c-48bf-8758-af5b1b880a6d)

Device details and Flutter/Dart/flutter_html versions:

flutter: 3.10.5 dart: 3.0.5 flutter_html: 3.0.0-beta.2

Sub6Resources commented 1 year ago

Good catch. Looks like the <p> inline margins are being handled correctly now, but margin collapsing isn't working quite right now for nested lists.