Problem 1: Section anchor IDs rendered as visible text
Section headings include {#section-8} which GitHub renders literally. GitHub markdown does not support {#id} syntax.
Fix: Use an HTML anchor tag above the heading: <a id="section-8"></a>
File: src/transforms/markdown.ts — section heading emitter
Problem 2: Subsections not separated by blank lines
Subsections (a), (b), (c) etc. are on separate lines in the raw markdown, but there's no blank line between them. In markdown, consecutive lines without a blank line are rendered as a single paragraph. GitHub renders them all running together.
Current raw markdown:
No disrespect should be shown to the flag...
**(a)** The flag should never be displayed...
**(b)** The flag should never touch...
Needed (blank lines between subsections):
No disrespect should be shown to the flag...
**(a)** The flag should never be displayed...
**(b)** The flag should never touch...
File: src/transforms/markdown.ts — renderSubsectionHeading() or the content node loop needs to prepend a blank line
Problem 3: All uscode.house.gov cross-reference links are broken
URLs are missing &num=0&edition=prelim query parameters. Without them, OLRC 302 redirects to docnotfound.xhtml.
File: buildCrossReference() in src/transforms/markdown.ts + source field in frontmatter
Problem 4: Note paragraphs concatenated into wall of text
Multiple <p> elements within a <note> (e.g., Executive Orders, Findings, Proclamations) are joined with spaces instead of paragraph breaks. The XML has proper <p> separation.
Example: Ex. Ord. No. 10834 has separate <p> elements for each WHEREAS clause, each Section, and each Part heading. Currently renders as one massive paragraph.
Fix: When rendering note content, join <p> elements with \n\n (double newline) instead of space.
File: likely in src/transforms/uslm-to-ir.ts (where note content is extracted) or src/transforms/markdown.ts (where notes are rendered)
Problem 5: Statutory notes from embedded Acts parsed as standalone sections
Text from embedded Acts (e.g., Pub. L. 109–243 'Freedom to Display the American Flag Act of 2005') is being parsed as top-level code sections (§ 1. SHORT TITLE., § 2. DEFINITIONS., etc.) and mixed in with the actual Title 4 sections. Same issue in Title 18 Chapter 44.
These are statutory notes that should remain within the note block, not promoted to section level.
File: src/transforms/uslm-to-ir.ts or src/transforms/parser.ts — section discovery logic
Problem 6: Historical and Revision Notes tables broken
Table data like RevisedSectionSource (U.S. Code)Source (Statutes at Large) is rendered as a single concatenated string with no formatting. The XML likely has table structure.
File: note rendering in src/transforms/markdown.ts
Problem 1: Section anchor IDs rendered as visible text
Section headings include
{#section-8}which GitHub renders literally. GitHub markdown does not support{#id}syntax.Fix: Use an HTML anchor tag above the heading:
<a id="section-8"></a>File:
src/transforms/markdown.ts— section heading emitterProblem 2: Subsections not separated by blank lines
Subsections (a), (b), (c) etc. are on separate lines in the raw markdown, but there's no blank line between them. In markdown, consecutive lines without a blank line are rendered as a single paragraph. GitHub renders them all running together.
Current raw markdown:
Needed (blank lines between subsections):
File:
src/transforms/markdown.ts—renderSubsectionHeading()or the content node loop needs to prepend a blank lineProblem 3: All uscode.house.gov cross-reference links are broken
URLs are missing
&num=0&edition=prelimquery parameters. Without them, OLRC 302 redirects todocnotfound.xhtml.File:
buildCrossReference()insrc/transforms/markdown.ts+sourcefield in frontmatterProblem 4: Note paragraphs concatenated into wall of text
Multiple
<p>elements within a<note>(e.g., Executive Orders, Findings, Proclamations) are joined with spaces instead of paragraph breaks. The XML has proper<p>separation.Example: Ex. Ord. No. 10834 has separate
<p>elements for each WHEREAS clause, each Section, and each Part heading. Currently renders as one massive paragraph.Fix: When rendering note content, join
<p>elements with\n\n(double newline) instead of space.File: likely in
src/transforms/uslm-to-ir.ts(where note content is extracted) orsrc/transforms/markdown.ts(where notes are rendered)Problem 5: Statutory notes from embedded Acts parsed as standalone sections
Text from embedded Acts (e.g., Pub. L. 109–243 'Freedom to Display the American Flag Act of 2005') is being parsed as top-level code sections (
§ 1. SHORT TITLE.,§ 2. DEFINITIONS., etc.) and mixed in with the actual Title 4 sections. Same issue in Title 18 Chapter 44.These are statutory notes that should remain within the note block, not promoted to section level.
File:
src/transforms/uslm-to-ir.tsorsrc/transforms/parser.ts— section discovery logicProblem 6: Historical and Revision Notes tables broken
Table data like
RevisedSectionSource (U.S. Code)Source (Statutes at Large)is rendered as a single concatenated string with no formatting. The XML likely has table structure.File: note rendering in
src/transforms/markdown.ts