[all-commits] [llvm/llvm-project] c304be: [mlir][docgen] Handle Windows line endings in doc ...

Scott Todd via All-commits all-commits at lists.llvm.org
Thu Jun 29 09:57:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c304be7cfdd2261811671feb252e31222365b475
      https://github.com/llvm/llvm-project/commit/c304be7cfdd2261811671feb252e31222365b475
  Author: Scott Todd <scotttodd at google.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Support/IndentedOstream.h
    M mlir/unittests/Support/IndentedOstreamTest.cpp

  Log Message:
  -----------
  [mlir][docgen] Handle Windows line endings in doc generation.

The `printReindented` function searches for Unix style line endings (`\n`), but strings may have Windows style line endings (`\r\n`). Prior to this change, generated document sections could have extra indentation, which some markdown renderers interpret as code blocks rather than paragraphs.

Differential Revision: https://reviews.llvm.org/D153591




More information about the All-commits mailing list