Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TexinfoTranslator won't allow section name of . #5871

Closed
brandonwillard opened this issue Jan 2, 2019 · 1 comment
Closed

TexinfoTranslator won't allow section name of . #5871

brandonwillard opened this issue Jan 2, 2019 · 1 comment

Comments

@brandonwillard
Copy link
Contributor

brandonwillard commented Jan 2, 2019

Subject: TexinfoTranslator won't allow section name of .

Problem

  • TexinfoTranslator.escape_id strips . from possible node names.

Procedure to reproduce the problem

> cd /tmp
> yes n | sphinx-quickstart -p test -a test --dot _ -v 0 -r 0 -l rst --master index --suffix .rst --makefile ./
> echo "\n.\n-\n\nThis is a subsection with a ``.`` as the title." >> index.rst
> make info

Error logs / results

Running Sphinx v1.8.3
loading translations [rst]... not available for built-in messages
making output directory...
building [mo]: targets for 0 po files that are out of date
building [texinfo]: all documents
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                                          
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing test.texi...index 
resolving references...
writing... 
Exception occurred:
  File "/home/bwillard/apps/anaconda3/lib/python3.6/site-packages/sphinx/writers/texinfo.py", line 309, in collect_node_menus
    assert 'node_name' in node and node['node_name']
AssertionError
The full traceback has been saved in /tmp/user/1000/sphinx-err-hqoqrlb7.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:19: info] Error 1

Expected results

Should produce a test.info file containing the following:

@menu
* .:: 

@end menu

@node .,,,Indices and tables
@anchor{index id1}@anchor{3}
@chapter .


This is a subsection with a . as the title.

Reproducible project / your project

Environment info

  • OS: Ubuntu 18.10
  • Python version: Python 3.6.7 :: Anaconda, Inc.
  • Sphinx version: 2.0.0+/58f4c658f
  • texi2any (GNU texinfo) 6.5
brandonwillard added a commit to brandonwillard/sphinx that referenced this issue Jan 2, 2019
@tk0miya tk0miya added this to the 1.8.4 milestone Jan 2, 2019
tk0miya pushed a commit to tk0miya/sphinx that referenced this issue Feb 3, 2019
@tk0miya
Copy link
Member

tk0miya commented Feb 3, 2019

Fixed by #6007.
Thanks,

@tk0miya tk0miya closed this as completed Feb 3, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants