This Help forum is for issues relates to the latest release (1.7.4). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."
  • Page:
  • 1

TOPIC:

Markdown in historical events 4 years 11 months ago #1

  • CCT
  • CCT's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 72
What would be the reasons for the following line in histo.en-US.php

$histo[] = "1 EVEN\n2 TYPE Historical Event\n2 DATE 11 FEB 1990\n2 NOTE Nelson Mandela [released](http://www.useful.url)
\n3 SOUR [Wikipedia](http://en.wikipedia.org/wiki/1990_in_South_Africa)";

to produce



where only the NOTE is formatted using markdown and not the SOUR?
Chris at genes.tronsmit.com
Attachments:

Please Log in or Create an account to join the conversation.

Markdown in historical events 4 years 11 months ago #2

  • thomas52
  • thomas52's Avatar
  • Away
  • Premium Member
  • Premium Member
  • Western North Carolina
  • Posts: 912
I don't have an answer, but I'd like to expand on your question. I have:

$histo[] = "1 EVEN War of 1812\n2 TYPE Historical Event\n2 DATE BET 1812 AND 1815\n2 NOTE War of 1812 between the Americans and the British. The Creek (or Red Stick) War in Alabama had different origins, but it coincided with the war of 1812, and the U.S. treated it as a part of the larger war, with Jackson and his forces also in charge of defeating the Creeks [Wikipedia] (goo.gl/cu6BNB) \n2 OBJE @M151@";

... and I get:

Historical Event -- War of 1812
between 1812 and 1815 (Age 12 months)
Note: War of 1812 between the Americans and the British. The Creek (or Red Stick) War in Alabama had different origins, but it coincided with the war of 1812, and the U.S. treated it as a part of the larger war, with Jackson and his forces also in charge of defeating the Creeks [Wikipedia] (goo.gl/cu6BNB)

... so I don't think the SOUR is relevant. Is it the markdown or something else?
"Failure is an amazing teacher." (L'échec est un professeur extraordinaire.)

Please Log in or Create an account to join the conversation.

Markdown in historical events 4 years 11 months ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
> What would be the reasons

Markdown is applied to notes and the text of source-citations.

You haven't added markdown to the citation text. You've added it to the source *name*.

FYI, there are two was to do source citations. The modern/prefered way with source records, and the old way with inline references. Since your SOUR record does not contain a link, it is assumed to be the old structure. See p39 of the GEDCOM spec.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Markdown in historical events 4 years 11 months ago #4

  • CCT
  • CCT's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 72
I was using the preferred sourcing method when I only had one tree. However, when I created a new tree (with missing source XREFs as compared to the histo files) the page would 'break' when it tried to format the non existing source reference. (Also in trees where sources had different XREFs compared to the numbering system of the histo file, incorrect references would be created, but do not lead to an error during page load)

So I thought that using the old structure would be good for the histo files, allowing the same histo file to be used for all the trees on my site (and perhaps be useful for other users).

In the old style, this is a <source_description> and not just a source name (p61 of the GEDCOM spec) and therefore it could be a good place to implement markdown.
Chris at genes.tronsmit.com

Please Log in or Create an account to join the conversation.

Markdown in historical events 4 years 11 months ago #5

  • CCT
  • CCT's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 72
@thomas 52: Remove the space between the two sets of brackets i.e. "[...] (...)" should be "[...](...)"
Chris at genes.tronsmit.com

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum