cortav  Diff

Differences From Artifact [ffa0ca0a64]:

To Artifact [ad59e4c740]:


    37     37   			['(SM)'] = '℠';
    38     38   		};
    39     39      };
    40     40   }
    41     41   
    42     42   local quotes = {
    43     43   	[ss.str.enc.utf8] = {
    44         -		['en'] = {'“', '”'; '‘', '’'};
    45         -		['de'] = {'„', '“'; '‚', '‘'};
    46         -		['sp'] = {'«', '»'; '‹', '›'};
    47         -		['ja'] = {'「', '」'; '『', '』'};
    48         -		['fr'] = {'« ', ' »'; '‹ ', ' ›'};
    49         -		[true] = {'“', '”'; '‘', '’'};
           44  +		-- 5 = elision char
           45  +		['en'] = {'“', '”';  '‘', '’';  '’'};
           46  +		['de'] = {'„', '“';  '‚', '‘';  '’'};
           47  +		['sp'] = {'«', '»';  '‹', '›';  "’"};
           48  +		['ja'] = {'「', '」'; '『', '』'; "'"};
           49  +		['fr'] = {'« ',' »'; '‹ ',' ›';  "’"};
           50  +		[true] = {'“', '”';  '‘', '’';  '’'};
    50     51   	};
    51     52   }
    52     53   
    53     54   local function meddle(ctx, t)
    54     55   	local pts = patterns[ctx.doc.enc]
    55     56   	if not pts then return t end
    56     57   	local str = ''
................................................................................
   139    140   	version = ss.version {0,1; 'devel'};
   140    141   	contributors = {{name='lexi hale', handle='velartrill', mail='lexi@hale.su', homepage='https://hale.su'}};
   141    142   	default = true; -- on unless inhibited
   142    143   	slow = true;
   143    144   	hook = {
   144    145   		doc_meddle_ast = function(job)
   145    146   			for n, sec in pairs(job.doc.secorder) do
   146         -				if sec.kind=='ordinary' or sec.kind=='blockquote'
          147  +				if sec.kind=='ordinary' or sec.kind=='quote'
   147    148   				or sec.kind=='footnote' then
   148    149   					for i, block in pairs(sec.blocks) do
   149    150   			         if type(block.spans) == 'table' then
   150    151   							enterspan(block.origin, block.spans)
   151    152   						elseif type(block.spans) == 'string' then
   152    153   							block.spans = meddle(block.origin, block.spans)
   153    154   						end
   154    155   					end
   155    156   				end
   156    157   			end
   157    158   		end;
   158    159   	};
   159    160   }