New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

text-annotator-v2

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-annotator-v2 - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "text-annotator-v2",
"version": "1.0.4",
"version": "1.0.5",
"description": "A JavaScript library for locating and annotating plain text in HTML",

@@ -5,0 +5,0 @@ "main": "build/text-annotator-v2.js",

@@ -101,5 +101,19 @@ # text-annotator-v2

## Comparing text-annotator-v2 and text-annotator
TBC
1. *text-annotator* can only use a single pair of annotation tags to annotate a piece of text, while *text-annotator-v2* can use any number of pairs of annotation tags depending on how "complex" the text is presented using HTML tags. For instance, given the following html:
```
<div>This is an <i>apple</i></div>
```
If we want to annotate *an apple*, *text-annotator* will only use a single annotation tag pair
```
<div>This is <...>an <i>apple</i></...></div>
```
In contrast, *text-annotator-v2* will use two annotation tag pairs
```
<div>This is <...>an </...><i><...>apple</...></i></div>
```
It seems *text-annotator* can provide a simpler solution in this case. However, *text-annotator-v2* aims to give a correct solution in all cases. For instance, if *an apple* is surrounding by a pair of block tags, such as *p*, instead of *i*, annotating *an apple* using non-block tag such as *span* or *mark* will break the html structure.
2. *text-annotator-v2* offers a "smaller" solution: the compressed file is only 3.66kb. In contrast, the the compressed file of *text-annotator* is 90kb.
## Contact
[Zhan Huang](mailto:z2hm@outlook.com "Zhan Huang")
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc