@khanacademy/simple-markdown
Advanced tools
Comparing version 0.9.1 to 0.9.2
# @khanacademy/simple-markdown | ||
## 0.9.2 | ||
### Patch Changes | ||
- 77391aa8: Fix issue with generated Flow types | ||
## 0.9.1 | ||
@@ -4,0 +10,0 @@ |
@@ -28,3 +28,3 @@ /* eslint-disable prefer-spread, no-regex-spaces, @typescript-eslint/no-unused-vars, guard-for-in, no-console, no-var */ | ||
// End Flow Definitions | ||
// End TypeScript Definitions | ||
@@ -282,5 +282,3 @@ var CR_NEWLINE_R = /\r\n?/g; | ||
// Removes falsey attributes | ||
if ( | ||
// $FlowFixMe | ||
Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) { | ||
if (Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) { | ||
attributeString += " " + sanitizeText(attr) + '="' + sanitizeText(attribute) + '"'; | ||
@@ -673,3 +671,2 @@ } | ||
order: currOrder++, | ||
// $FlowFixMe | ||
match: function (source, state) { | ||
@@ -951,3 +948,2 @@ // We only want to break into a list if we are at the start of a | ||
order: currOrder++, | ||
// $FlowFixMe | ||
match: function (source, state) { | ||
@@ -1252,5 +1248,3 @@ if (!state.inTable) { | ||
/** (deprecated) */ | ||
var ruleOutput = function ruleOutput( | ||
// $FlowFixMe | ||
rules, property) { | ||
var ruleOutput = function ruleOutput(rules, property) { | ||
if (!property && typeof console !== "undefined") { | ||
@@ -1382,5 +1376,3 @@ console.warn("simple-markdown ruleOutput should take 'react' or " + "'html' as the second argument."); | ||
for (var prop in props) { | ||
if (prop !== "source" && | ||
// $FlowFixMe | ||
Object.prototype.hasOwnProperty.call(props, prop)) { | ||
if (prop !== "source" && Object.prototype.hasOwnProperty.call(props, prop)) { | ||
divProps[prop] = props[prop]; | ||
@@ -1387,0 +1379,0 @@ } |
@@ -21,7 +21,3 @@ /** | ||
import * as React from "react"; | ||
type Capture = (Array<string> & { | ||
index: number; | ||
}) | (Array<string> & { | ||
index?: number; | ||
}); | ||
import type { Capture, MatchFunction, State } from "./troublesome-types"; | ||
type Attr = string | number | boolean | null | undefined; | ||
@@ -36,12 +32,4 @@ type SingleASTNode = { | ||
type ASTNode = SingleASTNode | Array<SingleASTNode>; | ||
type State = { | ||
key?: string | number | undefined; | ||
inline?: boolean | null | undefined; | ||
[key: string]: any; | ||
}; | ||
type ReactElement = React.ReactElement<any>; | ||
type ReactElements = React.ReactNode; | ||
type MatchFunction = { | ||
regex?: RegExp; | ||
} & ((source: string, state: State, prevCapture: string) => Capture | null | undefined); | ||
type Parser = (source: string, state?: State | null | undefined) => Array<SingleASTNode>; | ||
@@ -48,0 +36,0 @@ type ParseFunction = (capture: Capture, nestedParse: Parser, state: State) => UnTypedASTNode | ASTNode; |
@@ -30,3 +30,3 @@ 'use strict'; | ||
// End Flow Definitions | ||
// End TypeScript Definitions | ||
@@ -284,5 +284,3 @@ var CR_NEWLINE_R = /\r\n?/g; | ||
// Removes falsey attributes | ||
if ( | ||
// $FlowFixMe | ||
Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) { | ||
if (Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) { | ||
attributeString += " " + sanitizeText(attr) + '="' + sanitizeText(attribute) + '"'; | ||
@@ -675,3 +673,2 @@ } | ||
order: currOrder++, | ||
// $FlowFixMe | ||
match: function (source, state) { | ||
@@ -953,3 +950,2 @@ // We only want to break into a list if we are at the start of a | ||
order: currOrder++, | ||
// $FlowFixMe | ||
match: function (source, state) { | ||
@@ -1254,5 +1250,3 @@ if (!state.inTable) { | ||
/** (deprecated) */ | ||
var ruleOutput = function ( | ||
// $FlowFixMe | ||
rules, property) { | ||
var ruleOutput = function (rules, property) { | ||
if (!property && typeof console !== "undefined") { | ||
@@ -1385,5 +1379,3 @@ console.warn("simple-markdown ruleOutput should take 'react' or " + "'html' as the second argument."); | ||
for (var prop in props) { | ||
if (prop !== "source" && | ||
// $FlowFixMe | ||
Object.prototype.hasOwnProperty.call(props, prop)) { | ||
if (prop !== "source" && Object.prototype.hasOwnProperty.call(props, prop)) { | ||
divProps[prop] = props[prop]; | ||
@@ -1390,0 +1382,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"publishConfig": { | ||
@@ -9,0 +9,0 @@ "access": "public" |
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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18
659533
9506