Skip to content

Commit

Permalink
Fix warnings - `Inline substitution_reference start-string without en…
Browse files Browse the repository at this point in the history
…d-string.`

This escapes vertical bars in bash tree output in pydocs but doesnt fix rendering in html.
  • Loading branch information
saurabheights committed Aug 12, 2023
1 parent 9c956d2 commit 544ee3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/conf.in.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import re
import subprocess
import sys
from typing import List


def get_git_short_hash():
Expand Down Expand Up @@ -270,8 +271,22 @@ def skip(app, what, name, obj, would_skip, options):
return would_skip


def escape_vertical_bars(app, what, name, obj, options, lines: List[str]):
# Note - Latex docs also contains Vertical Bar, so we
# apply this filtering only to specific classes.
if name in [
"open3d.data.RedwoodIndoorLivingRoom1",
"open3d.data.RedwoodIndoorLivingRoom2",
"open3d.data.RedwoodIndoorOffice1",
"open3d.data.RedwoodIndoorOffice2",
]:
for index in range(len(lines)):
lines[index] = lines[index].replace("|", "\|")


def setup(app):
app.connect("autodoc-skip-member", skip)
app.connect("autodoc-process-docstring", escape_vertical_bars)
# Add Google analytics
app.add_js_file("https://www.googletagmanager.com/gtag/js?id=G-3TQPKGV6Z3",
**{'async': 'async'})
Expand Down

0 comments on commit 544ee3e

Please sign in to comment.