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

fountain-js

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fountain-js - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

11

CHANGELOG.md

@@ -9,2 +9,13 @@ # Change Log

## [1.1.1] - 2023-09-13
### Fixed
- Special characters like `#`, `$`, `%`, etc., now work in character names and are valid.
- Per specification, character names like `23` do not work but numbers in character names work regardless of order e.g. `R2D2` or `11A`.
### Changed
- You can force a character name with all numbers e.g. `123`, if desired.
## [1.1.0] - 2023-06-26

@@ -11,0 +22,0 @@

2

dist.esm/regex.js

@@ -6,3 +6,3 @@ export const regex = {

transition: /^((?:FADE (?:TO BLACK|OUT)|CUT TO BLACK)\.|.+ TO\:)|^(?:> *)(.+)/,
dialogue: /^(?:([A-Z*_][0-9A-Z ._\-']*(?:\(.*\))?[ ]*)|\@([A-Za-z*_][0-9A-Za-z (._\-')]*))(\^?)?(?:\n(?!\n+))([\s\S]+)/,
dialogue: /(?!^[0-9 _*]+(?:\(.*\))?[ *_]*(?:\^?)?\s*\n)(^(?:(?!\\?@|!)[^\^\(\)\na-z]+|@[^\^\(\)\n]+)(?:[ ]*\(.*\))?[ *_]*)(\^?)?\s*(?:\n(?!\n+))([\s\S]+)/,
parenthetical: /^(\(.+\))$/,

@@ -9,0 +9,0 @@ action: /^(.+)/g,

@@ -74,5 +74,8 @@ import { regex } from './regex';

const match = line.match(regex.dialogue);
let name = match[1] || match[2];
let name = match[1];
if (name.startsWith('@')) {
name = name.substring(1);
}
// iterating from the bottom up, so push dialogue blocks in reverse order
const isDualDialogue = !!(match[3]);
const isDualDialogue = !!(match[2]);
if (isDualDialogue) {

@@ -82,3 +85,3 @@ this.tokens.push(new DualDialogueEndToken());

this.tokens.push(new DialogueEndToken());
const parts = match[4].split(/(\(.+\))(?:\n+)/).reverse();
const parts = match[3].split(/(\(.+\))(?:\n+)/).reverse();
this.tokens.push(...parts.reduce((p, text = '') => {

@@ -85,0 +88,0 @@ if (!text.length) {

@@ -9,3 +9,3 @@ "use strict";

transition: /^((?:FADE (?:TO BLACK|OUT)|CUT TO BLACK)\.|.+ TO\:)|^(?:> *)(.+)/,
dialogue: /^(?:([A-Z*_][0-9A-Z ._\-']*(?:\(.*\))?[ ]*)|\@([A-Za-z*_][0-9A-Za-z (._\-')]*))(\^?)?(?:\n(?!\n+))([\s\S]+)/,
dialogue: /(?!^[0-9 _*]+(?:\(.*\))?[ *_]*(?:\^?)?\s*\n)(^(?:(?!\\?@|!)[^\^\(\)\na-z]+|@[^\^\(\)\n]+)(?:[ ]*\(.*\))?[ *_]*)(\^?)?\s*(?:\n(?!\n+))([\s\S]+)/,
parenthetical: /^(\(.+\))$/,

@@ -12,0 +12,0 @@ action: /^(.+)/g,

@@ -82,5 +82,8 @@ "use strict";

const match = line.match(regex_1.regex.dialogue);
let name = match[1] || match[2];
let name = match[1];
if (name.startsWith('@')) {
name = name.substring(1);
}
// iterating from the bottom up, so push dialogue blocks in reverse order
const isDualDialogue = !!(match[3]);
const isDualDialogue = !!(match[2]);
if (isDualDialogue) {

@@ -90,3 +93,3 @@ this.tokens.push(new DualDialogueEndToken());

this.tokens.push(new DialogueEndToken());
const parts = match[4].split(/(\(.+\))(?:\n+)/).reverse();
const parts = match[3].split(/(\(.+\))(?:\n+)/).reverse();
this.tokens.push(...parts.reduce((p, text = '') => {

@@ -93,0 +96,0 @@ if (!text.length) {

{
"name": "fountain-js",
"version": "1.1.0",
"version": "1.1.1",
"description": "A simple parser for Fountain, a markup language for formatting screenplays.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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