Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix section header type #63

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Fix section header type #63

merged 1 commit into from
Sep 25, 2023

Conversation

smigles
Copy link
Contributor

@smigles smigles commented Sep 24, 2023

Section header type changed from string to string | null because "The top is represented as level 1, with header null".

mwn/src/wikitext.ts

Lines 86 to 96 in 4442b4a

/**
* Parse sections from wikitext
* CAUTION: section header syntax in comments, nowiki tags,
* pre, source or syntaxhighlight tags can lead to wrong results.
* You're advised to run unbind() first.
* @returns {Section[]} array of
* section objects. Each section object has the level, header, index (of beginning) and content.
* Content *includes* the equal signs and the header.
* The top is represented as level 1, with header `null`.
*/
parseSections(): Section[];

@siddharthvp siddharthvp merged commit f768777 into siddharthvp:master Sep 25, 2023
@smigles smigles deleted the fix-section-header-type branch September 25, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants