equal
deleted
inserted
replaced
309 |
309 |
310 directive = block['admonitiontitle'] |
310 directive = block['admonitiontitle'] |
311 title = block['lines'][0].strip() if block['lines'] else None |
311 title = block['lines'][0].strip() if block['lines'] else None |
312 |
312 |
313 if i + 1 == len(blocks): |
313 if i + 1 == len(blocks): |
314 raise error.Abort(_('release notes directive %s lacks content') |
314 raise error.Abort(_('changeset %s: release notes directive %s ' |
315 % directive) |
315 'lacks content') % (ctx, directive)) |
316 |
316 |
317 # Now search ahead and find all paragraphs attached to this |
317 # Now search ahead and find all paragraphs attached to this |
318 # admonition. |
318 # admonition. |
319 paragraphs = [] |
319 paragraphs = [] |
320 for j in range(i + 1, len(blocks)): |
320 for j in range(i + 1, len(blocks)): |
323 # Margin blocks may appear between paragraphs. Ignore them. |
323 # Margin blocks may appear between paragraphs. Ignore them. |
324 if pblock['type'] == 'margin': |
324 if pblock['type'] == 'margin': |
325 continue |
325 continue |
326 |
326 |
327 if pblock['type'] != 'paragraph': |
327 if pblock['type'] != 'paragraph': |
328 repo.ui.warn(_('unexpected block in release notes ' |
328 repo.ui.warn(_('changeset %s: unexpected block in release ' |
329 'directive %s\n') % directive) |
329 'notes directive %s\n') % (ctx, directive)) |
330 |
330 |
331 if pblock['indent'] > 0: |
331 if pblock['indent'] > 0: |
332 paragraphs.append(pblock['lines']) |
332 paragraphs.append(pblock['lines']) |
333 else: |
333 else: |
334 break |
334 break |