1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-26 04:00:43 +03:00

Tidying up HTML generation

This commit is contained in:
Graham Nelson 2023-09-28 23:33:24 +01:00
parent dc58fc8138
commit 8e97864354
12 changed files with 31 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# Inform 7
[Version](notes/versioning.md): 10.2.0-beta+6X22 'Krypton' (26 September 2023)
[Version](notes/versioning.md): 10.2.0-beta+6X23 'Krypton' (28 September 2023)
## About Inform

View file

@ -1,3 +1,3 @@
Prerelease: beta
Build Date: 26 September 2023
Build Number: 6X22
Build Date: 28 September 2023
Build Number: 6X23

View file

@ -838,7 +838,9 @@ source_location Extensions::top_line_location(inform_extension *E) {
compiled_documentation *Extensions::get_documentation(inform_extension *E,
filename *sitemap) {
if (E == NULL) return NULL;
int was = SourceText::for_documentation_only(TRUE);
Copies::get_source_text(E->as_copy, I"getting documentation"); /* in the unlikely event this has not happened yet */
SourceText::for_documentation_only(was);
if (E->documentation_sought == FALSE) {
if (E->as_copy->location_if_path) {
pathname *D = Pathnames::down(E->as_copy->location_if_path, I"Documentation");

View file

@ -45,6 +45,7 @@ int SourceText::for_documentation_only(int state) {
source_file *SourceText::read_file(inbuild_copy *C, filename *F, text_stream *synopsis,
int primary) {
int documentation_only = source_reader_in_documentation_only_mode;
currently_lexing_into = C;
general_pointer ref = STORE_POINTER_inbuild_copy(NULL);
FILE *handle = Filenames::fopen(F, "r");

View file

@ -168,7 +168,8 @@ void Indexes::scan(compiled_documentation *cd) {
IFM_example *E;
LOOP_OVER_LINKED_LIST(E, IFM_example, cd->examples)
Indexes::scan_r(cd, E->header, NULL, E, &volume_number);
if (LinkedLists::len(cd->id.lemma_list) > 0) cd->id.present_with_index = TRUE;
if (LinkedLists::len(cd->id.lemma_list) > LinkedLists::len(cd->examples))
cd->id.present_with_index = TRUE;
}
void Indexes::scan_r(compiled_documentation *cd, markdown_item *md, markdown_item **latest,
@ -723,7 +724,7 @@ int Indexes::sort_comparison(const void *ent1, const void *ent2) {
HTML_OPEN("b");
if (EG) HTML_OPEN_WITH("a", "href=\"%S\"", EG->URL);
}
WRITE("<span class=\"index%S\">", category);
HTML_OPEN_WITH("span", "class=\"index%S\"", category);
WRITE("%S", lemma_wording);
HTML_CLOSE("span");
if (il->example_index_status == 1) {
@ -765,7 +766,6 @@ int Indexes::sort_comparison(const void *ent1, const void *ent2) {
WRITE_TO(link, "ex %S", E->insignia);
if (EG == NULL) A = E->URL;
}
if (Str::len(A) == 0) { LOG("Alert! No anchor for %S\n", link); }
IndexUtilities::general_link(OUT, link_class, A, link);
DISCARD_TEXT(link)
}

View file

@ -64,7 +64,8 @@
--md-background-colour: #e3e6ea;
--md-transcript-background-colour: #f9e9e9;
--md-dashed-border-colour: #2f6fab;
--md-extract-box-colour: #e9f9e9;
--md-extract-inform7-box-colour: #123456;
--md-extract-problem-box-colour: #e9f9e9;
--md-shaded-box-colour: #e9e9e9;
--md-transcript-deletion-colour: #ff0000;
--md-transcript-insertion-colour: #00ff00;
@ -176,7 +177,8 @@
--md-background-colour: #090b0d;
--md-transcript-background-colour: #091919;
--md-dashed-border-colour: #CfAf32;
--md-extract-box-colour: #1f111f;
--md-extract-inform7-box-colour: #123456;
--md-extract-problem-box-colour: #1f111f;
--md-shaded-box-colour: #111111;
--md-transcript-deletion-colour: #ffdddd;
--md-transcript-insertion-colour: #ddffdd;
@ -720,7 +722,18 @@ button.dangerousbutton {
margin: 0.75em;
padding: 0.75em;
border: 1px dotted var(--md-dashed-border-colour);
background-color: var(--md-extract-box-colour);
background-color: var(--md-extract-problem-box-colour);
}
.markdowncontent blockquote.extract-inform7 {
padding: 0.75em;
border: 1px dotted var(--md-dashed-border-colour);
background-color: var(--md-extract-problem-box-colour);
}
.markdowncontent blockquote.extract-inform7 td, th {
border: 0px;
padding: 0px;
}
.markdowncontent code.language-transcript {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture16Kit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"compatibility": "16-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture32Kit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"compatibility": "32-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "BasicInformKit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "CommandParserKit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "EnglishLanguageKit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "WorldModelKit",
"version": "10.2.0-beta+6X22"
"version": "10.2.0-beta+6X23"
},
"needs": [ {
"need": {