Documenting a help page on the new wikilink-in-extlink category

Hey there! I’m here again, so now that the new category has been added my mentor ask me to test if the code actually works with some random articles on Wikipedia. I’ve been doing that but Wikipedia has lots of articles like millions and I’ve not been lucky yet to fall on one with the link-in-link error. Nevertheless I started documenting the help page for the wikilink-in-extlink category , you can visit the page to get an overview. Now I’m patiently waiting that the code be deployed to see the…

Migrating Parsoid code and Getting started with PHP Linter Extension

Hello! hope we are all having a great time here, last time we went through the code that traversed the DOM and could detect links inside links if any existed. Today will go about migrating that code to lib/wt2html/pp/processors/Linter.js in Parsoid. With all that stated, I think we are good to go. Lets start with the code migration, the first thing is to take into consideration that we will not use the DOMtraverser and its methods, as the Linter has its own traverser and methods which we will use. Basically,…

Getting through the first task

Hello, I’m here again with some good news. I finally completed the first task, I could successfully traverse the DOM with the help of the DOMTraverser class which is a Pre-order depth-first DOM traversal helper. The DOMTraverser is a class that visits every node in the DOM, typically, as you visit the node you will want to do different things depending on the task at hand. The DOMTraverser has methods one of which is the addHandler(nodeName, action). With this method the DOMTraverser will pass a node (the ‘a’ node in…

Challenges I Face

Thus far, I’ve been stocked on traversing the DOM. Understanding the different parts of the DOM is one thing and traversing the DOM is another as one has to traverse the DOM to be able to detect any issue like the link inside link issue as is the case for this project. I remember talking about the DOM without mentioning BFS (Breadth First Search) and DFS (Depth First Search). This means I mistakenly left out the ways of traversing the DOM which is actually very important, the methods we saw…

2nd Week Report: Studying Parsoid code for the existing Linter categories.

Nice meeting you here again, hope you are enjoying the story. Let me divert a little before getting to the Parsoid code, lets throw an eye on this article: Parsoid: How Wikipedia catches up with the web. This article in a brief manner gives an overview of how Parsoid works, I highly encourage you to check it out. Parsoid has a linter module that examines the DOM and detects wikitext and HTML patterns that needs to be fixed by editors. The linter() function in this module takes the body element…

Why Outreachy?

Hello, welcome back! On my last post I announced the great news of being selected for the Outreachy December 2018 to March 2019 round! Yes :-), Its so amazing. I will walk you through the process so you  can get ready for the next round, yes I said next round because It runs twice a year. This means you have two chances each year of being selected, how amazing is this? Ok, let starts with the question: Why Outreachy? Firstly because it provides an amazing three-month internship to work in FOSS…

1st Week Report: Getting familiar with how wikitext linting works in Parsoid

Parsoid translate back-and-forth between wikitext syntax and an equivalent HTML document. By so doing identifies some errors which the linter extension can now track and show an editor with some hints for fixing. I started by learning the DOM and the tree data structure, the Document Object Model (DOM) is a programming interface for HTML and XML documents by definition. It allows a programming language to manipulate the content, style and structure of a website. The browser creates a representation of the document known as the Document Object Model. The…