@khanacademy/simple-markdown 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @khanacademy/simple-markdown
2
2
 
3
+ ## 0.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 77391aa8: Fix issue with generated Flow types
8
+
3
9
  ## 0.9.1
4
10
 
5
11
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -25,7 +25,7 @@
25
25
  // reuse defaultRules built-ins. So we make some stronger guarantess when
26
26
  // we can:
27
27
 
28
- // End Flow Definitions
28
+ // End TypeScript Definitions
29
29
 
30
30
  var CR_NEWLINE_R = /\r\n?/g;
31
31
  var TAB_R = /\t/g;
@@ -278,9 +278,7 @@ var htmlTag = function htmlTag(tagName, content, attributes, isClosed) {
278
278
  for (var attr in attributes) {
279
279
  var attribute = attributes[attr];
280
280
  // Removes falsey attributes
281
- if (
282
- // $FlowFixMe
283
- Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) {
281
+ if (Object.prototype.hasOwnProperty.call(attributes, attr) && attribute) {
284
282
  attributeString += " " + sanitizeText(attr) + '="' + sanitizeText(attribute) + '"';
285
283
  }
286
284
  }
@@ -668,7 +666,6 @@ var defaultRules = {
668
666
  },
669
667
  list: {
670
668
  order: currOrder++,
671
- // $FlowFixMe
672
669
  match: function (source, state) {
673
670
  // We only want to break into a list if we are at the start of a
674
671
  // line. This is to avoid parsing "hi * there" with "* there"
@@ -945,7 +942,6 @@ var defaultRules = {
945
942
  },
946
943
  tableSeparator: {
947
944
  order: currOrder++,
948
- // $FlowFixMe
949
945
  match: function (source, state) {
950
946
  if (!state.inTable) {
951
947
  return null;
@@ -1245,9 +1241,7 @@ var defaultRules = {
1245
1241
  };
1246
1242
 
1247
1243
  /** (deprecated) */
1248
- var ruleOutput = function ruleOutput(
1249
- // $FlowFixMe
1250
- rules, property) {
1244
+ var ruleOutput = function ruleOutput(rules, property) {
1251
1245
  if (!property && typeof console !== "undefined") {
1252
1246
  console.warn("simple-markdown ruleOutput should take 'react' or " + "'html' as the second argument.");
1253
1247
  }
@@ -1374,9 +1368,7 @@ var markdownToHtml = function markdownToHtml(source, state) {
1374
1368
  var ReactMarkdown = function ReactMarkdown(props) {
1375
1369
  var divProps = {};
1376
1370
  for (var prop in props) {
1377
- if (prop !== "source" &&
1378
- // $FlowFixMe
1379
- Object.prototype.hasOwnProperty.call(props, prop)) {
1371
+ if (prop !== "source" && Object.prototype.hasOwnProperty.call(props, prop)) {
1380
1372
  divProps[prop] = props[prop];
1381
1373
  }
1382
1374
  }