Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtf-parser

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtf-parser - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

16

CHANGELOG.md

@@ -5,2 +5,18 @@ # Change Log

<a name="1.3.0"></a>
# [1.3.0](https://github.com/iarna/rtf-parser/compare/v1.2.0...v1.3.0) (2018-07-08)
### Bug Fixes
* **nulls:** If a file is null terminated, don't emit the null ([7eee9a2](https://github.com/iarna/rtf-parser/commit/7eee9a2)), closes [#5](https://github.com/iarna/rtf-parser/issues/5)
### Features
* **fragments:** Add RTF fragment support ([a3fb225](https://github.com/iarna/rtf-parser/commit/a3fb225)), closes [#8](https://github.com/iarna/rtf-parser/issues/8)
* **line:** Add support for rtf \line command ([1ebda17](https://github.com/iarna/rtf-parser/commit/1ebda17)), closes [#9](https://github.com/iarna/rtf-parser/issues/9)
<a name="1.2.0"></a>

@@ -7,0 +23,0 @@ # [1.2.0](https://github.com/iarna/rtf-parser/compare/v1.1.0...v1.2.0) (2018-07-07)

2

package.json
{
"name": "rtf-parser",
"version": "1.2.0",
"version": "1.3.0",
"description": "This is a general RTF parser. It takes a text stream and produces a document object representing the parsed document. In and of itself, this isn't super useful but it's the building block for other tools to convert RTF into other formats.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,2 +36,5 @@ # rtf-parser

RTF fragments are supported. `\b hi there\b0` will generate a document with
`hi there` flagged as bold text.
The document returned is of the `RTFDocument` class, see below for details.

@@ -38,0 +41,0 @@

@@ -55,3 +55,3 @@ 'use strict'

while (this.groupStack.length) this.cmd$groupEnd()
const initialStyle = this.doc.content[0].style
const initialStyle = this.doc.content.length ? this.doc.content[0].style : []
for (let prop of Object.keys(this.doc.style)) {

@@ -110,2 +110,5 @@ let match = true

this.flushHexStore()
if (!this.group) { // an RTF fragment, missing the {\rtf1 header
this.group = this.doc
}
this.group.addContent(new RTFSpan(cmd))

@@ -131,2 +134,7 @@ }

// new line
ctrl$line () {
this.group.addContent(new RTFSpan({ value: '\n' }))
}
// alignment

@@ -133,0 +141,0 @@ ctrl$qc () {

@@ -31,3 +31,3 @@ 'use strict'

_flush (done) {
this.emitText()
if (this.text !== '\u0000') this.emitText()
done()

@@ -34,0 +34,0 @@ }

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