Compare commits

...
Author SHA1 Message Date
Mohamed Boudra e9ec40ab76 fix(app): keep numbered sub-list markers off their text on Android
On Android, a numbered list nested in a bulleted item drew "1." over
the first letters of each item. A nested item's text indent summed the
root list's narrow bullet column with a fixed marginLeft, while its
marker was right-aligned to its own wider "99." column, so the number
landed on the text. iOS already indents from the item's own column.

Backport the Android hunks of upstream enriched-markdown #1015 (size
the number column to the widest marker) and #1023 (nested items start
their text from their own marker column) into the existing package
patch. Upgrading to 1.2.0, which ships both, would also swap the md4c
parser that our patch's autolink fixes and web WASM build depend on.

test:android now also runs the backported ListRenderingTest and
TaskListInteractionTest suites.
2026-11-17 09:28:00 +01:00
3 changed files with 1378 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
"dev:ios": "npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo run:ios",
"build:apk": "npm --prefix ../.. run build:apk",
"build:apk:arm64": "npm --prefix ../.. run build:apk:arm64",
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --tests '*ListRenderingTest' --tests '*TaskListInteractionTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
},
"dependencies": {
"@codemirror/commands": "6.10.4",
File diff suppressed because it is too large Load Diff
+4
View File
@@ -17,6 +17,10 @@ const patchedPackages = [
// Backport https://github.com/software-mansion/enriched-markdown/pull/924: preserve settled
// Android measurements across parent clones. Remove those hunks when upgrading past
// 1.2.0-nightly-20261019-926ef06f0; reconcile the other local patch hunks separately.
// Android list layout: backports of https://github.com/software-mansion/enriched-markdown/pull/1015
// and https://github.com/software-mansion/enriched-markdown/pull/1023, so a numbered list under
// a bullet does not draw its numbers over the item text. Remove the list span, renderer and
// ListRenderingTest hunks when upgrading to 1.2.0 or later, which includes both.
{
nodeModulesPath: "packages/app/node_modules/react-native-enriched-markdown",
patchPrefix: "react-native-enriched-markdown+",