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

Add role directive #15

Open
kaystrobach opened this issue Oct 14, 2014 · 4 comments
Open

Add role directive #15

kaystrobach opened this issue Oct 14, 2014 · 4 comments

Comments

@kaystrobach
Copy link

.. ==================================================
.. DEFINE SOME TEXT ROLES
.. --------------------------------------------------

.. role::   typoscript(code)

.. role::   ts(typoscript)
   :class:  typoscript

.. role::   php(code)
    :language: php

.. highlight:: php
@Gregwar
Copy link
Owner

Gregwar commented Oct 14, 2014

Can you be more clear please?

@kaystrobach
Copy link
Author

i just tried to compile a set of documents, from the TYPO3 Extension sphinx
http://docs.typo3.org/typo3cms/extensions/sphinx/_sources/AdministratorManual/Index.txt
(there is a show source link on every page)
Or you use git directly
https://git.typo3.org/TYPO3CMS/Extensions/sphinx.git

During the compilation i get the following output:

PHP Fatal error:  Uncaught exception 'Exception' with message 'Unknown directive: only' in /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/ErrorManager.php:17
Stack trace:
#0 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(485): Gregwar\RST\ErrorManager->error('Unknown directi...')
#1 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(688): Gregwar\RST\Parser->getCurrentDirective()
#2 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(733): Gregwar\RST\Parser->parseLine('')
#3 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(751): Gregwar\RST\Parser->parseLines('\xEF\xBB\xBF.. =========...')
#4 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Builder.php(201): Gregwar\RST\Parser->parse('\xEF\xBB\xBF.. =========...')
#5 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Builder.php(115): Gregwar\RST\Builder->parseAll()
#6 /Users/kay/Development/rest/index.php(16): Gregwar\RST\Builder->build('input', 'output', true)
#7 { in /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/ErrorManager.php on line 17
Kays-MacBook-Pro:rest kay$ php index.php
* Loading metas
* Pre-scanning files
 -> Scanning index...
* Parsing files
 -> Parsing index...
PHP Fatal error:  Uncaught exception 'Exception' with message 'Unknown directive: only' in /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/ErrorManager.php:17
Stack trace:
#0 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(485): Gregwar\RST\ErrorManager->error('Unknown directi...')
#1 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(688): Gregwar\RST\Parser->getCurrentDirective()
#2 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(733): Gregwar\RST\Parser->parseLine('')
#3 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Parser.php(751): Gregwar\RST\Parser->parseLines('\xEF\xBB\xBF.. =========...')
#4 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Builder.php(201): Gregwar\RST\Parser->parse('\xEF\xBB\xBF.. =========...')
#5 /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/Builder.php(115): Gregwar\RST\Builder->parseAll()
#6 /Users/kay/Development/rest/index.php(16): Gregwar\RST\Builder->build('input', 'output', true)
#7 { in /Users/kay/Development/rest/vendor/gregwar/rst/Gregwar/RST/ErrorManager.php on line 17

So i tried to figure out, what the problem is, perhaps it's enough to have an option to ignore these kind of errors and just go on compiling?

@xperseguers
Copy link

From my point of view (I'm the author of the aforementioned manual), roles are of secondary interest. The file that defines those roles is a standard in the TYPO3 world however goal (in that example) is to allow inline highlighting of short code, something I did not actually use. Some special markers are however very useful: http://docs.typo3.org/typo3cms/drafts/github/xperseguers/RstPrimer/AdvancedMarkup.html#other-semantic-markup

@Gregwar
Copy link
Owner

Gregwar commented Oct 14, 2014

Actually, if you want to make a pure-PHP builder for the Typo3 doc, we'll have to define what is Typo3 documentation specific and what is not
I can help on the core, but the specific work may need some people of your team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants