linux-doc.vger.kernel.org archive mirror
 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
  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 16:34 ` [RFC PATCH 1/2] scripts/kernel-doc: Auto-detect common code-blocks Matthew Wilcox
  0 siblings, 2 replies; 7+ 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


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 7+ 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 ` [RFC PATCH 2/2] wait: add a keyword to indicate a diagram code block on a kernel-doc Mauro Carvalho Chehab
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:51   ` Jonathan Corbet
2018-05-14 11:03     ` Jani Nikula
2018-07-05 15:40       ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).