Browse Source

fix: typo

Byaidu 1 year ago
parent
commit
b099f0a70d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pdf2zh/converter.py

+ 2 - 2
pdf2zh/converter.py

@@ -528,10 +528,10 @@ class TextConverter(PDFConverter[AnyIO]):
                         pstk[-1][5] = child.font
                     sstk[-1] += child.get_text()
                 else:                                                       # 公式入栈
-                    if (                                                    # 根据公式侧的文字修正公式的纵向偏移
+                    if (                                                    # 根据公式侧的文字修正公式的纵向偏移
                         not vstk                                            # 1. 当前字符是公式的第一个字符
                         and cls == xt_cls                                   # 2. 当前字符与前一个字符属于同一段落
-                        and child.x0 > xt.x0                                # 3. 当前字符在前一个字符右
+                        and child.x0 > xt.x0                                # 3. 前一个字符在公式左
                     ):
                         vfix = child.y0 - xt.y0
                     vstk.append(child)