All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] scripts/kernel-doc: Auto-detect common code-blocks
@ 2018-05-10 14:38 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2018-05-10 14:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, Christoph Hellwig,
	Linux Doc Mailing List, linux-kernel, Ingo Molnar,
	Peter Zijlstra

Comments that end with a comma and have certain keywords
should be presented as code-blocks

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 scripts/kernel-doc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0057d8eafcc1..8ce2d0f54369 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -803,7 +803,8 @@ sub output_highlight_rst {
 	#
 	if (! $in_literal) {
 	    $block .= $line . "\n";
-	    if (($line =~ /$sphinx_literal/) || ($line =~ /$sphinx_cblock/)) {
+	    if (($block =~ s/(code|example|artwork|flow|diagram)([^\:]*:)\n/$1$2:\n/) ||
+	        ($line =~ /$sphinx_literal/) || ($line =~ /$sphinx_cblock/)) {
 		$in_literal = 1;
 		$litprefix = "";
 		$output .= highlight_block($block);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-07-05 15:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 14:38 [RFC PATCH 1/2] scripts/kernel-doc: Auto-detect common code-blocks Mauro Carvalho Chehab
2018-05-10 14:38 ` Mauro Carvalho Chehab
2018-05-10 14:38 ` [RFC PATCH 2/2] wait: add a keyword to indicate a diagram code block on a kernel-doc Mauro Carvalho Chehab
2018-05-10 14:38   ` Mauro Carvalho Chehab
2018-05-10 16:33   ` Randy Dunlap
2018-05-10 16:33     ` Randy Dunlap
2018-05-10 16:34 ` [RFC PATCH 1/2] scripts/kernel-doc: Auto-detect common code-blocks Matthew Wilcox
2018-05-10 16:34   ` Matthew Wilcox
2018-05-10 16:51   ` Jonathan Corbet
2018-05-10 16:51     ` Jonathan Corbet
2018-05-14 11:03     ` Jani Nikula
2018-05-14 11:03       ` Jani Nikula
2018-07-05 15:40       ` Daniel Vetter
2018-07-05 15:40         ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.