By Bilal Karaali, compareDocs Product Manager
Nothing tests patience and eyesight like trying to find an error in a line of code. HTML can break from something as small as forgetting to close a bracket to leaving out a full stop in a hyperlink tag. With platforms like WordPress, Joomla, and Drupal, web content management is available to more than just developers. So, when things go wrong and a WordPress user doesn't have Visual Studio or other powerful tools to get into the nitty-gritty of the code they don't have many options.
Fortunately, compareDocs can help.
A step-by-step guide to finding errors in code using compareDocs:
STEP 1: Locate the line of code with errors
For common errors like a broken hyperlink, incorrect text formatting, or inconsistent paragraph breaks, find the line or section of code with errors within the source code or HTML view of the web page, highlight it and select copy. Open compareDocs and paste it into the ‘Modified’ field of the User Interface.
'Original’ HTML without error
'Modified’ HTML with an error
STEP 2: Find a similar line of code that works
Copy a similar snippet from another page where the code displays correctly. This will become your ‘Original’ text in compareDocs. Paste it directly into the field within the UI.
STEP 3: Compare the two versions to find the errors
Once the code has been pasted in, select Word output with redline or Track Changes as the output. When you click on ‘Compare,’ a Word document will pop up and show the differences between the two snippets of code. The changes in your ‘Modified’ aka broken code can show you what’s missing or wrong and allow you to fix the issue.
The comparison report showing the error: the ‘/script’ tag is broken in the ‘Modified’ code since < and > have been removed
Not a compareDocs user yet? Download a free trial and see how the market-leading document comparison tool can make your life easier.