Merge branch 'update-pandoc216'

Mise à jour vers Pandoc 2.16.2
This commit is contained in:
Bastien Dumont 2022-01-09 22:34:15 +01:00
commit f960266e4c
6 changed files with 18 additions and 12 deletions

View File

@ -20,7 +20,7 @@
function Str (s)
if string.match(s.c, '[0-9mdclxvi]+[0-9mdclxvi]+') then
return pandoc.Str(string.gsub(s.c, '', '-'))
if string.match(s.text, '[0-9mdclxvi]+[0-9mdclxvi]+') then
return pandoc.Str(string.gsub(s.text, '', '-'))
end
end

View File

@ -19,9 +19,9 @@
]]--
local function isLineIndication(first, middle, last)
return last.t == 'Str' and string.match(last.c, '^l. [^,]+,?$')
return last.t == 'Str' and string.match(last.text, '^l. [^,]+,?$')
and middle.t == 'Space'
and first.t == 'Str' and string.match(first.c, '.+,$')
and first.t == 'Str' and string.match(first.text, '.+,$')
end
local function isCommaAfterLineIndication(lineIndication)
@ -31,10 +31,10 @@ end
function Inlines (inlines)
for i = #inlines, 3, -1 do
if isLineIndication(inlines[i-2], inlines[i-1], inlines[i]) then
firstString = inlines[i-2].c
firstString = inlines[i-2].text
inlines[i-2].text = string.match(firstString, '^[^,]+')
if isCommaAfterLineIndication(inlines[i].c) then
inlines[i].text = string.match(inlines[i].c, '^[^,]+')
if isCommaAfterLineIndication(inlines[i].text) then
inlines[i].text = string.match(inlines[i].text, '^[^,]+')
inlines:insert(i+1, pandoc.Str(','))
end
inlines[i] = pandoc.Superscript(pandoc.Str(string.sub(inlines[i].text, 5)))

View File

@ -1,3 +1,5 @@
#!/bin/bash
########################################################################
# Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
#
@ -16,7 +18,11 @@
#
########################################################################
#!/bin/bash
####################################################################################
# Le filtre remove-superfluous-spaces.sh devrait être remplacé par un filtre Lua. #
# Si son exécution cause une erreur sur votre système ou si vous utilisez Windows, #
# n'hésitez pas à m'écrire pour que je me décide à régler ce problème. #
####################################################################################
sed 's/ "},{"t":"Space"},/ "},/g' - | # Espace simple ajoutée entre le prénom et le nom.
sed 's/,{"t":"Space"},{"t":"Str","c":" /,{"t":"Str","c":" /g' | #

View File

@ -36,10 +36,10 @@ local function isPatrologiaReference(first, second, third, last)
)
)
and (second.t == 'Str'
and string.match(second.c, '^ [0-9]+,$')
and string.match(second.text, '^ [0-9]+,$')
and third.t == 'Space'
and last.t == 'Str'
and string.match(last.c, '^col. $'))
and string.match(last.text, '^col. $'))
end
function Inlines (inlines)

View File

@ -25,7 +25,7 @@ Le fichier `Utilitaires/Makefile` fait appel aux programmes suivants :
* Pour les tests :
* bash
* pandoc >=2.13
* pandoc = 2.16.2
* dwdiff
* sort
* uniq

View File

@ -530,7 +530,7 @@ N. <span class="smallcaps">Direction dactes de colloque</span> (éd.), <em>T
N. de la <span class="smallcaps">Particule</span>, N. de l<span class="smallcaps">Autreparticule</span>, N.-P. <span class="smallcaps">Auteur</span>, N. <span class="smallcaps">Autreauteur-Deuxième</span> et N. P. <span class="smallcaps">Etatsunien</span>, <em>Titre abrégé</em>|N. de la <span class="smallcaps">Particule</span>, N. de l<span class="smallcaps">Autreparticule</span>, N.-P. <span class="smallcaps">Auteur</span>, N. <span class="smallcaps">Autreauteur-Deuxième</span> et N. P. <span class="smallcaps">Etatsunien</span>, <em>Noms spéciaux</em>, Lieu de publication 2000.
</div>
</div>
<section class="footnotes" role="doc-endnotes">
<section class="footnotes footnotes-end-of-document" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>N. <span class="smallcaps">Auteur</span>, <em>Livre traduit</em>, traduit de langlais par N. <span class="smallcaps">Traducteur</span>, Lieu de publication 2000 (1983<sup>1</sup>).<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>