diff --git a/README.md b/README.md index a0716306d..4b3874d0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -[Version](notes/versioning.md): 10.2.0-beta+6X60 'Krypton' (12 May 2024) +[Version](notes/versioning.md): 10.2.0-beta+6X61 'Krypton' (13 May 2024) ## About Inform diff --git a/build.txt b/build.txt index f6a86f6af..431775aed 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: beta -Build Date: 12 May 2024 -Build Number: 6X60 +Build Date: 13 May 2024 +Build Number: 6X61 diff --git a/docs/supervisor-module/7-dc.html b/docs/supervisor-module/7-dc.html index 5d25f98fb..7822a8d26 100644 --- a/docs/supervisor-module/7-dc.html +++ b/docs/supervisor-module/7-dc.html @@ -1014,7 +1014,8 @@ in the secondary (if there is one). } } else { if (md->next) md = md->next; - while ((md) && (md->next) && (md->next->type != HEADING_MIT)) md = md->next; + while ((md) && (DocumentationCompiler::skippable_item(md->next, eg))) + md = md->next; eg_header->next = md->next; md->next = eg_header; } @@ -1024,7 +1025,8 @@ in the secondary (if there is one). eg_header->user_state = STORE_POINTER_IFM_example(eg); markdown_item *md = stc->secondary_placement; if (md->next) md = md->next; - while ((md) && (md->next) && (md->next->type != HEADING_MIT)) md = md->next; + while ((md) && (DocumentationCompiler::skippable_item(md->next, eg))) + md = md->next; eg_header->next = md->next; md->next = eg_header; } @@ -1034,6 +1036,21 @@ in the secondary (if there is one). } } } + +int DocumentationCompiler::skippable_item(markdown_item *md, IFM_example *by) { + if (md == NULL) return FALSE; + if (md->type == HEADING_MIT) { + if (Markdown::get_heading_level(md) == 1) return FALSE; + if (Markdown::get_heading_level(md) == 2) return FALSE; + } + if (md->type == INFORM_EXAMPLE_HEADING_MIT) { + IFM_example *already = RETRIEVE_POINTER_IFM_example(md->user_state); + if (already->star_count > by->star_count) return FALSE; + if (already->star_count < by->star_count) return TRUE; + if (Str::cmp(already->name, by->name) > 0) return FALSE; + } + return TRUE; +}

§19. And lastly, we can number the examples. This is done as a third stage of processing and not as part of the second because we must also pick up diff --git a/inbuild/supervisor-module/Chapter 7/Documentation Compiler.w b/inbuild/supervisor-module/Chapter 7/Documentation Compiler.w index 7eaf18bcf..4218d60b0 100644 --- a/inbuild/supervisor-module/Chapter 7/Documentation Compiler.w +++ b/inbuild/supervisor-module/Chapter 7/Documentation Compiler.w @@ -888,7 +888,8 @@ void DocumentationCompiler::place_example_heading_items(compiled_documentation * } } else { if (md->next) md = md->next; - while ((md) && (md->next) && (md->next->type != HEADING_MIT)) md = md->next; + while ((md) && (DocumentationCompiler::skippable_item(md->next, eg))) + md = md->next; eg_header->next = md->next; md->next = eg_header; } @@ -898,7 +899,8 @@ void DocumentationCompiler::place_example_heading_items(compiled_documentation * eg_header->user_state = STORE_POINTER_IFM_example(eg); markdown_item *md = stc->secondary_placement; if (md->next) md = md->next; - while ((md) && (md->next) && (md->next->type != HEADING_MIT)) md = md->next; + while ((md) && (DocumentationCompiler::skippable_item(md->next, eg))) + md = md->next; eg_header->next = md->next; md->next = eg_header; } @@ -909,6 +911,21 @@ void DocumentationCompiler::place_example_heading_items(compiled_documentation * } } +int DocumentationCompiler::skippable_item(markdown_item *md, IFM_example *by) { + if (md == NULL) return FALSE; + if (md->type == HEADING_MIT) { + if (Markdown::get_heading_level(md) == 1) return FALSE; + if (Markdown::get_heading_level(md) == 2) return FALSE; + } + if (md->type == INFORM_EXAMPLE_HEADING_MIT) { + IFM_example *already = RETRIEVE_POINTER_IFM_example(md->user_state); + if (already->star_count > by->star_count) return FALSE; + if (already->star_count < by->star_count) return TRUE; + if (Str::cmp(already->name, by->name) > 0) return FALSE; + } + return TRUE; +} + @ And lastly, we can number the examples. This is done as a third stage of processing and not as part of the second because we must also pick up example headers explicitly written in the source text of a single-file extension, diff --git a/inform7/Figures/memory-diagnostics.txt b/inform7/Figures/memory-diagnostics.txt index 11a89334d..d826905a8 100644 --- a/inform7/Figures/memory-diagnostics.txt +++ b/inform7/Figures/memory-diagnostics.txt @@ -267,7 +267,7 @@ Total memory consumption was 143681K = 140 MB 99.9% was used for memory not allocated for objects: - 63.1% text stream storage 92847756 bytes in 541398 claims + 63.1% text stream storage 92848204 bytes in 541402 claims 3.9% dictionary storage 5795776 bytes in 7837 claims ---- sorting 6424 bytes in 1489 claims 4.8% source text 7200000 bytes in 3 claims diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt index 2a0af3b32..03db4c5d9 100644 --- a/inform7/Figures/timings-diagnostics.txt +++ b/inform7/Figures/timings-diagnostics.txt @@ -1,29 +1,28 @@ 100.0% in inform7 run - 66.9% in compilation to Inter - 45.2% in //Sequence::undertake_queued_tasks// - 4.7% in //MajorNodes::pre_pass// - 3.6% in //MajorNodes::pass_1// + 67.4% in compilation to Inter + 45.3% in //Sequence::undertake_queued_tasks// + 4.8% in //MajorNodes::pre_pass// + 3.3% in //MajorNodes::pass_1// 1.8% in //ImperativeDefinitions::assess_all// 1.4% in //RTKindConstructors::compile// 1.4% in //RTPhrasebook::compile_entries// 1.1% in //Sequence::lint_inter// - 0.7% in //ImperativeDefinitions::compile_first_block// 0.3% in //CompletionModule::compile// + 0.3% in //ImperativeDefinitions::compile_first_block// 0.3% in //MajorNodes::pass_2// 0.3% in //Sequence::undertake_queued_tasks// 0.3% in //Sequence::undertake_queued_tasks// 0.3% in //World::stage_V// - 4.8% not specifically accounted for - 27.2% in running Inter pipeline - 8.8% in step 14/15: generate inform6 -> auto.inf - 6.9% in step 5/15: load-binary-kits - 5.8% in step 6/15: make-synoptic-module + 5.7% not specifically accounted for + 26.5% in running Inter pipeline + 8.6% in step 14/15: generate inform6 -> auto.inf + 7.1% in step 5/15: load-binary-kits + 5.6% in step 6/15: make-synoptic-module 1.8% in step 9/15: make-identifiers-unique - 0.3% in step 11/15: eliminate-redundant-labels 0.3% in step 12/15: eliminate-redundant-operations 0.3% in step 4/15: compile-splats 0.3% in step 7/15: shorten-wiring 0.3% in step 8/15: detect-indirect-calls - 1.9% not specifically accounted for - 5.1% in supervisor + 1.8% not specifically accounted for + 5.2% in supervisor 0.8% not specifically accounted for diff --git a/inform7/Internal/HTML/main.css b/inform7/Internal/HTML/main.css index a3644055b..bd7bcba16 100644 --- a/inform7/Internal/HTML/main.css +++ b/inform7/Internal/HTML/main.css @@ -46,7 +46,8 @@ --button-text-background-colour: #ffffff; --syntaxdefinition-colour: #000040; - --syntaxfunction-colour: #000040; + --syntaxheading-colour: #7f0000; + --syntaxfunction-colour: #5f0000; --syntaxreserved-colour: #000040; --syntaxelement-colour: #000040; --syntaxidentifier-colour: #000040; @@ -166,7 +167,8 @@ --button-text-background-colour: #ffffff; --syntaxdefinition-colour: #e0e0ff; - --syntaxfunction-colour: #e0e0ff; + --syntaxheading-colour: #7f0000; + --syntaxfunction-colour: #ffe0e0; --syntaxreserved-colour: #e0e0ff; --syntaxelement-colour: #e0e0ff; --syntaxidentifier-colour: #e0e0ff; @@ -754,10 +756,17 @@ button.dangerousbutton { .markdowncontent div.extract-transcript { margin: 0.75em; + margin-inline-start: 40px; + margin-inline-end: 40px; padding: 0.75em; border: 1px dotted var(--md-dashed-border-colour); background-color: var(--md-transcript-background-colour); } + +.markdowncontent div.extract-transcript pre { + white-space: pre-wrap; +} + .markdowncontent div.extract-code { margin: 0.75em; padding: 0.75em; @@ -813,7 +822,8 @@ button.dangerousbutton { /* Used in syntax-colouring for extension documentation */ span.syntaxdefinition { color: var(--syntaxdefinition-colour); } -span.syntaxfunction { color: var(--syntaxfunction-colour); } +span.syntaxheading { color: var(--syntaxheading-colour); text-decoration: underline; } +span.syntaxfunction { color: var(--syntaxfunction-colour); font-style: italic; } span.syntaxplain { color: var(--syntaxplain-colour); } span.syntaxelement { color: var(--syntaxelement-colour); } span.syntaxidentifier { color: var(--syntaxidentifier-colour); } diff --git a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json index 0423c5012..6366451f7 100644 --- a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json +++ b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "Architecture16Kit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "compatibility": "16-bit", "kit-details": { diff --git a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json index 9680d1ac2..d576f33c2 100644 --- a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json +++ b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "Architecture32Kit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "compatibility": "32-bit", "kit-details": { diff --git a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json index f91a47ca1..42289c33c 100644 --- a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json +++ b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "BasicInformKit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json index 03807eac4..c31d35c5e 100644 --- a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json +++ b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "CommandParserKit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json index 6a11a48fd..7e3f6d680 100644 --- a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json +++ b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "EnglishLanguageKit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json index 0e83a66b0..90d591ee4 100644 --- a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json +++ b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "WorldModelKit", - "version": "10.2.0-beta+6X60" + "version": "10.2.0-beta+6X61" }, "needs": [ { "need": { diff --git a/inform7/Internal/PLs/Inform.ildf b/inform7/Internal/PLs/Inform.ildf index 7356791ea..8cb647971 100644 --- a/inform7/Internal/PLs/Inform.ildf +++ b/inform7/Internal/PLs/Inform.ildf @@ -9,3 +9,32 @@ String Literal: "\"" # a spurious comment betraying Inweb's involvement in the process - Suppress Disclaimer: true + +colouring { + runs of unquoted { + matches of /\aSection .*?\z/ { + => !heading + } + matches of /\aChapter .*?\z/ { + => !heading + } + matches of /\aVolume .*?\z/ { + => !heading + } + matches of /\aBook .*?\z/ { + => !heading + } + matches of /\aPart .*?\z/ { + => !heading + } + matches of /\a\s*->.*?\z/ { + => !function + } + matches of /\a\s*<-.*?\z/ { + => !function + } + matches of /\a\(.*?\.\) *\z/ { + => !function + } + } +} diff --git a/resources/Documentation/Writing with Inform.md b/resources/Documentation/Writing with Inform.md index 31589f35e..49dee4237 100644 --- a/resources/Documentation/Writing with Inform.md +++ b/resources/Documentation/Writing with Inform.md @@ -5748,7 +5748,7 @@ The effect here is that we'd see Consider this beat: - (about the Zeppelin) + (About the Zeppelin.) Hans: "See our prodigious rate of climb, Ludwig!" @@ -5762,7 +5762,7 @@ Because of that, each beat has a list of _required speakers_. If the source text But if that is not what the author wants, the cue can be more explicit: - (about the Zeppelin; requiring Hans) + (About the Zeppelin; requiring Hans.) Hans: "What a prodigious rate of climb!" @@ -5872,7 +5872,7 @@ The list of live conversational subjects is best thought of as pretty ephemeral, - A subject becomes live whenever a line of dialogue `mentioning` it is performed. For example, if Bernardo says this line: - Bernardo (mentioning Denmark): This bodes some strange eruption to our state. + Bernardo (mentioning Denmark): "This bodes some strange eruption to our state." then `Denmark` becomes a live conversational subject.