question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

=header= support as <h1>

See original GitHub issue

I updated wtf_wikipedia@8.5.1 to wtf_wikipedia@9.0.0. Now I got following error when parsing to HTML with the additional modul wtf-plugin-html@0.2.1:

if (options.title === true && data.title) {

TypeError: Cannot read property ‘title’ of undefined at Document.toHtml [as html] (Y:_dev\wikiparser\node_modules\wtf-plugin-html\builds\wtf-plugin-html.js:34:40) at Object.<anonymous> (Y:_dev\wikiparser\app.js:46:20) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

reproduce with this steps:

create test folder

npm init
npm i wtf_wikipedia
npm i wtf-plugin-html

create app.js

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-html'))

var input = "'''some bold text'''"

console.log(wtf(input).html())

run node app

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
spencermountaincommented, May 11, 2021

hey, thanks Murat - I’m not sure what happened there. I reproduced this, and fixed it in 0.2.2 thanks for the heads-up. cheers

0reactions
spencermountaincommented, Dec 8, 2022

I didn’t realize single-equal sign headers were possible. Looks like they are. I tried tweaking the regex to support these but started seeing failures on headings like this: == Publikasies<ref>Esaach: http://www.esaach.org.za/index.php?title=Behr,_Mark</ref> == gonna punt one this for now. Can rework the section parser to be smarter, if this shows up for more cases. cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is an H1 Tag? Why It Matters & Best Practices for SEO
An H1 tag is code that marks up the title of a webpage. ... A quick browse of supporting headers (like H2s and...
Read more >
<h1>–<h6>: The HTML Section Heading elements
The <h1> to <h6> HTML elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest....
Read more >
How To Write a Header Tag (h1) for SEO - Pear Analytics
1. Put your header tag <h1> </h1> at the top of the page, preferably after the <body> tag. · 2. Are you targeting...
Read more >
H1 Tag SEO: How To Optimize Your Headers for Search
Explore h1 tag SEO and improve your search rankings with header tag best practices and SEO tips to optimize your h1 tags for...
Read more >
How to Use Header Tags and H1 Tags Effectively for SEO
Learn why using header tags and H1 tags makes your site more user-friendly, as well as the SEO benefits for your digital marketing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found