Skip to content

Develop - #4

Merged
ma2za merged 4 commits into
mainfrom
develop
Jan 10, 2023
Merged

Develop#4
ma2za merged 4 commits into
mainfrom
develop

Conversation

@ma2za

@ma2za ma2za commented Jan 10, 2023

Copy link
Copy Markdown
Owner

No description provided.

@ma2za
ma2za merged commit 5d65771 into main Jan 10, 2023
@ma2za
ma2za deleted the develop branch May 11, 2023 14:13
MattFisher added a commit to MattFisher/python-substack that referenced this pull request Jul 10, 2026
Inline math ($x$ and $$x$$ via dollarmath's double_inline) now maps to
Substack's inline `latex` node, confirmed against the live API. Previously
inline math tokens were silently dropped.

Also restores the [^unused] and [^listnote] footnote definitions in the
e2e fixture, which had been corrupted, dropping footnote ma2za#4 from coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MattFisher added a commit to MattFisher/python-substack that referenced this pull request Jul 10, 2026
Inline math ($x$ and $$x$$ via dollarmath's double_inline) now maps to
Substack's inline `latex` node, confirmed against the live API. Previously
inline math tokens were silently dropped.

Also restores the [^unused] and [^listnote] footnote definitions in the
e2e fixture, which had been corrupted, dropping footnote ma2za#4 from coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ma2za added a commit that referenced this pull request Jul 18, 2026
…65)

* Add table and LaTeX block support

GFM tables (`| col | col |`) map to Substack's table/table_row/
table_header/table_cell schema. Table node shape was confirmed by
probing the live API.

LaTeX math blocks ($$...$$) map to latex_block via mdit_py_plugins'
dollarmath plugin. Both features are covered by unit tests and the
e2e fixture/golden file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add inline LaTeX support and fix corrupted footnote fixture

Inline math ($x$ and $$x$$ via dollarmath's double_inline) now maps to
Substack's inline `latex` node, confirmed against the live API. Previously
inline math tokens were silently dropped.

Also restores the [^unused] and [^listnote] footnote definitions in the
e2e fixture, which had been corrupted, dropping footnote #4 from coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Restrict inline LaTeX to standard single-dollar syntax

Drop dollarmath's double_inline option so $$...$$ is only ever a display
block, matching the common Markdown convention. Inline math stays $...$.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Replace tables with pull quotes, callouts, and sub/superscript

Substack has no table renderer or insert UI, so the table node (added
earlier) stored but never displayed. Removed it in favor of features
Substack actually supports, confirmed by round-tripping editor-authored
nodes through the live API:

- pullquote and calloutBlock via `:::pullquote` / `:::callout` containers
- superscript (`^x^`) and subscript (`~x~`) inline marks

Subscript's single-tilde syntax coexists with `~~strikethrough~~`.

The sub/superscript plugins require mdit-py-plugins >= 0.5, so the
constraint and lockfile are updated (now resolves 0.6.1).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Document supported Markdown features

Add docs/markdown.md covering every Markdown construct from_markdown()
converts (formatting, headings, lists, images, footnotes, math, pull
quotes, callouts) plus what is intentionally unsupported (tables,
editor-only widgets). Link it from the README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix currency false-positives and labeled blocks in dollar-math parsing

Address PR #65 review feedback from ma2za:

- Configure dollarmath with allow_space=False and allow_digits=False
  (Pandoc-style delimiters), so paired dollar amounts like
  "$5 million to $10 million" stay plain text instead of being parsed
  as inline math.
- Render math_block_label tokens ("$$ ... $$ (label)") as latex_block,
  discarding the label, instead of silently dropping the whole block.
- Add both of the reviewer's regression tests and document the
  delimiter rules in docs/markdown.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JfNdp5q3sjjY62Zd6ZMzg3

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: ma2za <mazzapaolo2019@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant