pandorga 1.7.5 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/assets/css/article.css +17 -0
- data/lib/pandorga/commands/new.rb +1 -1
- data/lib/pandorga/version.rb +1 -1
- data/scripts/test/test-css-structure.rb +22 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5073aa0e7217490eff99e42008ea7eb10fdd6d5f7218d924d7ede563a77c2f4
|
|
4
|
+
data.tar.gz: 38b8947ef41f97e1e1c6c6c2d2048fd5a16ebd1a441d4dc6ae62a9b5237582c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73d9948f8662e076b4f652697969ed7da53c108b336efea4b91c497310c7332f3c82f3d4ee854f6630a248c27356d219b6d50ffec70e437b098340a1153b1ee0
|
|
7
|
+
data.tar.gz: b2dde560408d681b3cfcf3a4f5bc377542d1179b28279a19bbd065b8f7f9d04a994ebe7800a20645a18eb6562c9335d6e785f22f952d6c4b605c4f61f1ad912e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.6] — 2026-10-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- A long inline formula scrolls inside the article column below 768px.
|
|
8
|
+
Display math was already contained, and a 390px phone still measured
|
|
9
|
+
scrollWidth 667 because `mjx-container` without `display="true"` is
|
|
10
|
+
`display: inline` and cannot scroll. Below 768px that box is
|
|
11
|
+
`inline-block`, `max-width: 100%`, `overflow-x: auto`, and
|
|
12
|
+
`overflow-y: hidden`. Wider viewports keep it inline. `html` and
|
|
13
|
+
`body` do not set overflow.
|
|
14
|
+
|
|
15
|
+
No `pandorga:` config keys were added or renamed. Font roles and the
|
|
16
|
+
ledger fallbacks are unchanged.
|
|
17
|
+
|
|
3
18
|
## [1.7.5] — 2026-10-12
|
|
4
19
|
|
|
5
20
|
### Fixed
|
data/assets/css/article.css
CHANGED
|
@@ -99,6 +99,23 @@
|
|
|
99
99
|
vertical-align: baseline;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
/* Below 768px a long inline formula is still `display: inline`, so it has
|
|
103
|
+
no scrollport and widens the document. Display math was already contained,
|
|
104
|
+
and a 390px phone still measured scrollWidth 667 from the inline boxes.
|
|
105
|
+
`inline-block` keeps the formula in the line and lets max-width and
|
|
106
|
+
overflow apply. `[jax]` stays ahead of MathJax's own container rule.
|
|
107
|
+
Desktop stays inline. Do not put this overflow on html or body. */
|
|
108
|
+
@media (max-width: 767px) {
|
|
109
|
+
.article-content mjx-container:not([display="true"]),
|
|
110
|
+
.article-content mjx-container[jax]:not([display="true"]) {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
max-width: 100%;
|
|
113
|
+
overflow-x: auto;
|
|
114
|
+
overflow-y: hidden;
|
|
115
|
+
vertical-align: baseline;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
102
119
|
/* A display equation is a block in the prose flow, so it takes the paragraph
|
|
103
120
|
gap and nothing more. Two things used to inflate it, to a measured 52px
|
|
104
121
|
above the equation and 39px below against a 22px paragraph gap.
|
|
@@ -24,7 +24,7 @@ module Pandorga
|
|
|
24
24
|
|
|
25
25
|
gem "pandorga", "~> 1.3"
|
|
26
26
|
# Local checkout: gem "pandorga", path: "../pandorga"
|
|
27
|
-
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.7.
|
|
27
|
+
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.7.6"
|
|
28
28
|
gem "csv"
|
|
29
29
|
gem "base64"
|
|
30
30
|
RUBY
|
data/lib/pandorga/version.rb
CHANGED
|
@@ -160,6 +160,28 @@ if article_sheet.match?(/mjx-container[^{]*\{[^}]*overflow\s*:\s*visible/m)
|
|
|
160
160
|
errors << "assets/css/article.css: display math sets overflow: visible"
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
+
# PLT-AC-38. Inline formulas scroll inside the column below 768px. The
|
|
164
|
+
# unscoped rule stays display:inline so a short formula on a wide column
|
|
165
|
+
# remains in the line.
|
|
166
|
+
inline_selector = '.article-content mjx-container:not([display="true"])'
|
|
167
|
+
inline_jax = '.article-content mjx-container[jax]:not([display="true"])'
|
|
168
|
+
inline_bodies = declaration_bodies(article_sheet, inline_selector)
|
|
169
|
+
inline_base = inline_bodies.find { |body| body.match?(/display:\s*inline\s*;/) && !body.match?(/inline-block/) }
|
|
170
|
+
unless inline_base
|
|
171
|
+
errors << "assets/css/article.css: #{inline_selector} must stay display:inline outside the phone query"
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
mobile_inline = nil
|
|
175
|
+
article_sheet.scan(/@media\s*\(\s*max-width:\s*767px\s*\)\s*\{((?:[^{}]|\{[^{}]*\})*)\}/m) do |inner,|
|
|
176
|
+
mobile_inline = inner if inner.include?(inline_selector)
|
|
177
|
+
end
|
|
178
|
+
if mobile_inline.nil?
|
|
179
|
+
errors << "assets/css/article.css: inline math scroll is not limited to max-width 767px"
|
|
180
|
+
else
|
|
181
|
+
require_declarations(errors, "assets/css/article.css", mobile_inline, inline_selector, math_box + ["display: inline-block"])
|
|
182
|
+
require_declarations(errors, "assets/css/article.css", mobile_inline, inline_jax, math_box + ["display: inline-block"])
|
|
183
|
+
end
|
|
184
|
+
|
|
163
185
|
require_declarations(
|
|
164
186
|
errors, "assets/css/article.css", article_sheet,
|
|
165
187
|
".article-content figure", ["max-width: 100%"]
|