mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2025-08-12 15:07:11 +02:00
Clean up types
- merge `ItemType`/`BlockType` to `TextType` - fix bug with duplicate and flattened types
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
import Item from './Item';
|
||||
import ItemType from './ItemType';
|
||||
import { HeadlineType } from './text-types';
|
||||
|
||||
/**
|
||||
* Table of contents usually parsed by `DetectToc.ts`.
|
||||
*/
|
||||
export default class TOC {
|
||||
constructor(public tocHeadlineItems: Item[], public pages: number[], public detectedHeadlineLevels: Set<ItemType>) {}
|
||||
constructor(
|
||||
public tocHeadlineItems: Item[],
|
||||
public pages: number[],
|
||||
public detectedHeadlineLevels: Set<HeadlineType>,
|
||||
) {}
|
||||
|
||||
startPage(): number {
|
||||
return Math.min(...this.pages);
|
||||
|
Reference in New Issue
Block a user