From 6e871c4eb84ed98510167a39b348919ae6bd5555 Mon Sep 17 00:00:00 2001 From: rnwzd Date: Tue, 10 Nov 2020 18:38:35 +0000 Subject: [PATCH] Fixed statistics page --- .gitattributes | 0 .github/FUNDING.yml | 0 .gitignore | 0 .vscode/launch.json | 0 .vscode/settings.json | 0 .vscode/tasks.json | 0 .vscodeignore | 0 CHANGELOG.md | 0 FAQ.md | 0 Fountainexport spec draft.md | 0 LICENSE.md | 0 README.md | 0 assets/note_dark.svg | 0 assets/note_dark_offset.svg | 0 assets/note_light.svg | 0 assets/note_light_offset.svg | 0 assets/scene.svg | 0 assets/section1.svg | 0 assets/section2.svg | 0 assets/section3.svg | 0 assets/section4.svg | 0 assets/section5.svg | 0 assets/synopse.svg | 0 assets/synopse_offset.svg | 0 assets/synopsis.svg | 0 flaticon.svg | 0 icon.png | Bin icon.svg | 0 icon_fullres.png | Bin jest.config.js | 0 language-configuration.json | 0 package-lock.json | 0 package.json | 0 screenshots/Dark_plus.PNG | Bin screenshots/Github_dark.PNG | Bin src/__mocks__/vscode.ts | 0 src/afterwriting-parser.ts | 0 src/configloader.ts | 0 src/courierprime/courier-prime-bold-italic.ttf | Bin src/courierprime/courier-prime-bold.ttf | Bin src/courierprime/courier-prime-italic.ttf | Bin src/courierprime/courier-prime.ttf | Bin src/extension.ts | 2 +- src/helpers.ts | 0 src/noisetexture.png | Bin src/pdf/liner.ts | 0 src/pdf/pdf.ts | 0 src/pdf/pdfmaker.ts | 4 ++-- src/pdf/print.ts | 0 src/preview.html | 0 src/providers/Completion.ts | 0 src/providers/Decorations.ts | 0 src/providers/Folding.ts | 0 src/providers/Outline.ts | 0 src/providers/Preview.ts | 0 src/providers/Symbols.ts | 0 src/script_to_time.txt | 0 src/statistics.ts | 0 src/telemetry.ts | 0 src/test/completion.test.ts | 0 src/test/diagnostics.test.ts | 0 src/test/helper.ts | 0 src/test/index.ts | 0 src/test/scripts/big_fish_crlf.fountain | 0 src/test/scripts/big_fish_lf.fountain | 0 src/test/scripts/brick_and_steel_crlf.fountain | 0 src/test/scripts/brick_and_steel_lf.fountain | 0 src/test/statistics.spec.ts | 0 src/token.ts | 0 src/utils.ts | 0 src/utils/dispose.ts | 0 src/utils/topMostLineMonitor.ts | 0 syntaxes/fountain.tmlanguage | 0 tsconfig.json | 0 74 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 .gitattributes mode change 100644 => 100755 .github/FUNDING.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .vscode/launch.json mode change 100644 => 100755 .vscode/settings.json mode change 100644 => 100755 .vscode/tasks.json mode change 100644 => 100755 .vscodeignore mode change 100644 => 100755 CHANGELOG.md mode change 100644 => 100755 FAQ.md mode change 100644 => 100755 Fountainexport spec draft.md mode change 100644 => 100755 LICENSE.md mode change 100644 => 100755 README.md mode change 100644 => 100755 assets/note_dark.svg mode change 100644 => 100755 assets/note_dark_offset.svg mode change 100644 => 100755 assets/note_light.svg mode change 100644 => 100755 assets/note_light_offset.svg mode change 100644 => 100755 assets/scene.svg mode change 100644 => 100755 assets/section1.svg mode change 100644 => 100755 assets/section2.svg mode change 100644 => 100755 assets/section3.svg mode change 100644 => 100755 assets/section4.svg mode change 100644 => 100755 assets/section5.svg mode change 100644 => 100755 assets/synopse.svg mode change 100644 => 100755 assets/synopse_offset.svg mode change 100644 => 100755 assets/synopsis.svg mode change 100644 => 100755 flaticon.svg mode change 100644 => 100755 icon.png mode change 100644 => 100755 icon.svg mode change 100644 => 100755 icon_fullres.png mode change 100644 => 100755 jest.config.js mode change 100644 => 100755 language-configuration.json mode change 100644 => 100755 package-lock.json mode change 100644 => 100755 package.json mode change 100644 => 100755 screenshots/Dark_plus.PNG mode change 100644 => 100755 screenshots/Github_dark.PNG mode change 100644 => 100755 src/__mocks__/vscode.ts mode change 100644 => 100755 src/afterwriting-parser.ts mode change 100644 => 100755 src/configloader.ts mode change 100644 => 100755 src/courierprime/courier-prime-bold-italic.ttf mode change 100644 => 100755 src/courierprime/courier-prime-bold.ttf mode change 100644 => 100755 src/courierprime/courier-prime-italic.ttf mode change 100644 => 100755 src/courierprime/courier-prime.ttf mode change 100644 => 100755 src/extension.ts mode change 100644 => 100755 src/helpers.ts mode change 100644 => 100755 src/noisetexture.png mode change 100644 => 100755 src/pdf/liner.ts mode change 100644 => 100755 src/pdf/pdf.ts mode change 100644 => 100755 src/pdf/pdfmaker.ts mode change 100644 => 100755 src/pdf/print.ts mode change 100644 => 100755 src/preview.html mode change 100644 => 100755 src/providers/Completion.ts mode change 100644 => 100755 src/providers/Decorations.ts mode change 100644 => 100755 src/providers/Folding.ts mode change 100644 => 100755 src/providers/Outline.ts mode change 100644 => 100755 src/providers/Preview.ts mode change 100644 => 100755 src/providers/Symbols.ts mode change 100644 => 100755 src/script_to_time.txt mode change 100644 => 100755 src/statistics.ts mode change 100644 => 100755 src/telemetry.ts mode change 100644 => 100755 src/test/completion.test.ts mode change 100644 => 100755 src/test/diagnostics.test.ts mode change 100644 => 100755 src/test/helper.ts mode change 100644 => 100755 src/test/index.ts mode change 100644 => 100755 src/test/scripts/big_fish_crlf.fountain mode change 100644 => 100755 src/test/scripts/big_fish_lf.fountain mode change 100644 => 100755 src/test/scripts/brick_and_steel_crlf.fountain mode change 100644 => 100755 src/test/scripts/brick_and_steel_lf.fountain mode change 100644 => 100755 src/test/statistics.spec.ts mode change 100644 => 100755 src/token.ts mode change 100644 => 100755 src/utils.ts mode change 100644 => 100755 src/utils/dispose.ts mode change 100644 => 100755 src/utils/topMostLineMonitor.ts mode change 100644 => 100755 syntaxes/fountain.tmlanguage mode change 100644 => 100755 tsconfig.json diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.vscode/launch.json b/.vscode/launch.json old mode 100644 new mode 100755 diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100644 new mode 100755 diff --git a/.vscode/tasks.json b/.vscode/tasks.json old mode 100644 new mode 100755 diff --git a/.vscodeignore b/.vscodeignore old mode 100644 new mode 100755 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/FAQ.md b/FAQ.md old mode 100644 new mode 100755 diff --git a/Fountainexport spec draft.md b/Fountainexport spec draft.md old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/assets/note_dark.svg b/assets/note_dark.svg old mode 100644 new mode 100755 diff --git a/assets/note_dark_offset.svg b/assets/note_dark_offset.svg old mode 100644 new mode 100755 diff --git a/assets/note_light.svg b/assets/note_light.svg old mode 100644 new mode 100755 diff --git a/assets/note_light_offset.svg b/assets/note_light_offset.svg old mode 100644 new mode 100755 diff --git a/assets/scene.svg b/assets/scene.svg old mode 100644 new mode 100755 diff --git a/assets/section1.svg b/assets/section1.svg old mode 100644 new mode 100755 diff --git a/assets/section2.svg b/assets/section2.svg old mode 100644 new mode 100755 diff --git a/assets/section3.svg b/assets/section3.svg old mode 100644 new mode 100755 diff --git a/assets/section4.svg b/assets/section4.svg old mode 100644 new mode 100755 diff --git a/assets/section5.svg b/assets/section5.svg old mode 100644 new mode 100755 diff --git a/assets/synopse.svg b/assets/synopse.svg old mode 100644 new mode 100755 diff --git a/assets/synopse_offset.svg b/assets/synopse_offset.svg old mode 100644 new mode 100755 diff --git a/assets/synopsis.svg b/assets/synopsis.svg old mode 100644 new mode 100755 diff --git a/flaticon.svg b/flaticon.svg old mode 100644 new mode 100755 diff --git a/icon.png b/icon.png old mode 100644 new mode 100755 diff --git a/icon.svg b/icon.svg old mode 100644 new mode 100755 diff --git a/icon_fullres.png b/icon_fullres.png old mode 100644 new mode 100755 diff --git a/jest.config.js b/jest.config.js old mode 100644 new mode 100755 diff --git a/language-configuration.json b/language-configuration.json old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/screenshots/Dark_plus.PNG b/screenshots/Dark_plus.PNG old mode 100644 new mode 100755 diff --git a/screenshots/Github_dark.PNG b/screenshots/Github_dark.PNG old mode 100644 new mode 100755 diff --git a/src/__mocks__/vscode.ts b/src/__mocks__/vscode.ts old mode 100644 new mode 100755 diff --git a/src/afterwriting-parser.ts b/src/afterwriting-parser.ts old mode 100644 new mode 100755 diff --git a/src/configloader.ts b/src/configloader.ts old mode 100644 new mode 100755 diff --git a/src/courierprime/courier-prime-bold-italic.ttf b/src/courierprime/courier-prime-bold-italic.ttf old mode 100644 new mode 100755 diff --git a/src/courierprime/courier-prime-bold.ttf b/src/courierprime/courier-prime-bold.ttf old mode 100644 new mode 100755 diff --git a/src/courierprime/courier-prime-italic.ttf b/src/courierprime/courier-prime-italic.ttf old mode 100644 new mode 100755 diff --git a/src/courierprime/courier-prime.ttf b/src/courierprime/courier-prime.ttf old mode 100644 new mode 100755 diff --git a/src/extension.ts b/src/extension.ts old mode 100644 new mode 100755 index e3df0fd7..d0608dbf --- a/src/extension.ts +++ b/src/extension.ts @@ -145,7 +145,7 @@ export async function exportPdf(showSaveDialog:boolean = true, openFileOnSave:bo var parsed = await afterparser.parse(editor.document.getText(), config, false); - var exportconfig : ExportConfig = {highlighted_characters: []} + var exportconfig : ExportConfig = undefined if ( highlightCharacters ) { var highlighted_characters = await vscode.window.showQuickPick(Array.from(parsed.properties.characters.keys()) ,{canPickMany:true}) var exportconfig : ExportConfig = {highlighted_characters: highlighted_characters} diff --git a/src/helpers.ts b/src/helpers.ts old mode 100644 new mode 100755 diff --git a/src/noisetexture.png b/src/noisetexture.png old mode 100644 new mode 100755 diff --git a/src/pdf/liner.ts b/src/pdf/liner.ts old mode 100644 new mode 100755 diff --git a/src/pdf/pdf.ts b/src/pdf/pdf.ts old mode 100644 new mode 100755 diff --git a/src/pdf/pdfmaker.ts b/src/pdf/pdfmaker.ts old mode 100644 new mode 100755 index a931f3df..3795e10f --- a/src/pdf/pdfmaker.ts +++ b/src/pdf/pdfmaker.ts @@ -490,11 +490,11 @@ import { openFile, revealFile, trimCharacterExtension, wordToColor } from "../ut function get_text_properties(lline = line, expcfg = exportcfg, old_text_properties = general_text_properties) { var new_text_properties = Object.assign({},old_text_properties) - if (lline.type === 'character') { + if (!!expcfg && lline.type === 'character') { var character = trimCharacterExtension(lline.text) // refer to Liner in ./liner.ts character = character.replace(/([0-9]* - )/, ""); - if (expcfg.highlighted_characters.includes(character)) { + if (!!expcfg.highlighted_characters && expcfg.highlighted_characters.includes(character)) { new_text_properties.highlight = true; new_text_properties.highlightcolor = wordToColor(character); }; diff --git a/src/pdf/print.ts b/src/pdf/print.ts old mode 100644 new mode 100755 diff --git a/src/preview.html b/src/preview.html old mode 100644 new mode 100755 diff --git a/src/providers/Completion.ts b/src/providers/Completion.ts old mode 100644 new mode 100755 diff --git a/src/providers/Decorations.ts b/src/providers/Decorations.ts old mode 100644 new mode 100755 diff --git a/src/providers/Folding.ts b/src/providers/Folding.ts old mode 100644 new mode 100755 diff --git a/src/providers/Outline.ts b/src/providers/Outline.ts old mode 100644 new mode 100755 diff --git a/src/providers/Preview.ts b/src/providers/Preview.ts old mode 100644 new mode 100755 diff --git a/src/providers/Symbols.ts b/src/providers/Symbols.ts old mode 100644 new mode 100755 diff --git a/src/script_to_time.txt b/src/script_to_time.txt old mode 100644 new mode 100755 diff --git a/src/statistics.ts b/src/statistics.ts old mode 100644 new mode 100755 diff --git a/src/telemetry.ts b/src/telemetry.ts old mode 100644 new mode 100755 diff --git a/src/test/completion.test.ts b/src/test/completion.test.ts old mode 100644 new mode 100755 diff --git a/src/test/diagnostics.test.ts b/src/test/diagnostics.test.ts old mode 100644 new mode 100755 diff --git a/src/test/helper.ts b/src/test/helper.ts old mode 100644 new mode 100755 diff --git a/src/test/index.ts b/src/test/index.ts old mode 100644 new mode 100755 diff --git a/src/test/scripts/big_fish_crlf.fountain b/src/test/scripts/big_fish_crlf.fountain old mode 100644 new mode 100755 diff --git a/src/test/scripts/big_fish_lf.fountain b/src/test/scripts/big_fish_lf.fountain old mode 100644 new mode 100755 diff --git a/src/test/scripts/brick_and_steel_crlf.fountain b/src/test/scripts/brick_and_steel_crlf.fountain old mode 100644 new mode 100755 diff --git a/src/test/scripts/brick_and_steel_lf.fountain b/src/test/scripts/brick_and_steel_lf.fountain old mode 100644 new mode 100755 diff --git a/src/test/statistics.spec.ts b/src/test/statistics.spec.ts old mode 100644 new mode 100755 diff --git a/src/token.ts b/src/token.ts old mode 100644 new mode 100755 diff --git a/src/utils.ts b/src/utils.ts old mode 100644 new mode 100755 diff --git a/src/utils/dispose.ts b/src/utils/dispose.ts old mode 100644 new mode 100755 diff --git a/src/utils/topMostLineMonitor.ts b/src/utils/topMostLineMonitor.ts old mode 100644 new mode 100755 diff --git a/syntaxes/fountain.tmlanguage b/syntaxes/fountain.tmlanguage old mode 100644 new mode 100755 diff --git a/tsconfig.json b/tsconfig.json old mode 100644 new mode 100755