Skip to content

Fix bug where api-documenter was incorrectly escaping certain special characters - #393

Merged
Pete Gonzalez (octogonz) merged 6 commits into
masterfrom
pgonzal/escape-bug
Oct 13, 2017
Merged

Pete Gonzalez (octogonz) merged 6 commits into
masterfrom
pgonzal/escape-bug

Conversation

@octogonz

Copy link
Copy Markdown
Collaborator

string.replace("x", "y") only replaces the first match.

@@ -115,12 +115,12 @@ export class MarkdownRenderer {

private static _getEscapedText(text: string): string {

@qz2017 QZ (qz2017) Oct 13, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_getEscapedText [](start = 17, length = 15)

It would be nice to have a test case for it. #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. I added this case to the existing unit test, and found a couple bugs in doing so. :-)


In reply to: 144613075 [](ancestors = 144613075)

const docItemSet: DocItemSet = new DocItemSet();

const dataFolder: string = path.join(__dirname, '../files');
const dataFolder: string = path.join(__dirname, '../local');

@qz2017 QZ (qz2017) Oct 13, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local [](start = 52, length = 5)

Is this folder only used by api-doc or for general usage? #Resolved

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General usage. I'm planning to update the sp-client .gitignore as well, and document our standardized folder names on the wiki.


In reply to: 144613385 [](ancestors = 144613385)

@qz2017 QZ (qz2017) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@qz2017

QZ (qz2017) commented Oct 13, 2017 •

Copy link
Copy Markdown
Contributor
FileDiffTest.assertEqual(outputFilename, path.join(__dirname, 'ExpectedOutput.md'));

I suppose you need to update this md file with those new texts. #Resolved


Refers to: libraries/api-documenter/src/test/MarkdownPageRenderer.test.ts:69 in 1ce0c6c. [](commit_id = 1ce0c6c, deletion_comment = False)

@octogonz

Copy link
Copy Markdown
Collaborator Author
FileDiffTest.assertEqual(outputFilename, path.join(__dirname, 'ExpectedOutput.md'));

I thought I did, but actually I was updating the informational copy of the file. :-) I improved FileDiffTest to mark the copy as read-only to avoid this confusion


In reply to: 336529032 [](ancestors = 336529032)


Refers to: libraries/api-documenter/src/test/MarkdownPageRenderer.test.ts:69 in 1ce0c6c. [](commit_id = 1ce0c6c, deletion_comment = False)

@octogonz
Pete Gonzalez (octogonz) merged commit 07a0469 into master Oct 13, 2017
@iclanton
Ian Clanton-Thuon (iclanton) deleted the pgonzal/escape-bug branch November 1, 2017 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants