@marvalt/wparser 0.1.69 → 0.1.71
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.
package/dist/index.cjs
CHANGED
|
@@ -2144,7 +2144,7 @@ function extractTextAlignFromInnerBlocks(block) {
|
|
|
2144
2144
|
*/
|
|
2145
2145
|
function parseContentPosition(contentPosition) {
|
|
2146
2146
|
if (!contentPosition) {
|
|
2147
|
-
return { horizontal: '
|
|
2147
|
+
return { horizontal: 'center', vertical: 'center' };
|
|
2148
2148
|
}
|
|
2149
2149
|
const parts = contentPosition.trim().split(/\s+/);
|
|
2150
2150
|
const part1 = parts[0] || '';
|
|
@@ -2169,10 +2169,15 @@ function parseContentPosition(contentPosition) {
|
|
|
2169
2169
|
horizontal = 'center';
|
|
2170
2170
|
vertical = part2;
|
|
2171
2171
|
}
|
|
2172
|
+
else if (part2 === 'left' || part2 === 'right') {
|
|
2173
|
+
// WordPress format: "center right" -> vertical=center, horizontal=right
|
|
2174
|
+
vertical = 'center';
|
|
2175
|
+
horizontal = part2;
|
|
2176
|
+
}
|
|
2172
2177
|
else {
|
|
2173
|
-
// "center center"
|
|
2178
|
+
// "center center" -> both center
|
|
2174
2179
|
horizontal = 'center';
|
|
2175
|
-
vertical =
|
|
2180
|
+
vertical = 'center';
|
|
2176
2181
|
}
|
|
2177
2182
|
}
|
|
2178
2183
|
else {
|