Comments (9)
It's not supported by default. However, if you have that plugin installed, you can specify it it your project file as an extra markdown extension to load. See https://github.com/cmacmackin/ford/wiki/Project-File-Options#md_extension. You'd specify it in the same way that you would when loading Markdown in Python. So I believe for that extension you need to write markdown_checklist.extension
.
from ford.
Hi Chris,
I am sorry my mistake. Anyhow, I have tried your trick, but I failed.
- I have tried with your doc-instructions:
- the meta name should be md_extensions, i.e. with plural, otherwise Ford does not recognize the user extension (in https://github.com/cmacmackin/ford/blob/master/ford/__init__.py, line 77, the plural is searched);
- trying the example of markdown.etensions.toc does not work; maybe the correct extension name is markdown.extensions.toc, in case the doc should be corrected; however, using the probably correct name I have obtained:
|stefano@zaghi|0|02:04 PM Fri Jan 23|
|~/fortran/IR_Precision|6 files, 232Kb|
|->ford doc/main_page.md
Reading file ./src/IR_Precision.f90
Traceback (most recent call last):
File "/usr/bin/ford", line 9, in <module>
load_entry_point('FORD==1.1.0', 'console_scripts', 'ford')()
File "/usr/lib/python2.7/site-packages/ford/__init__.py", line 151, in main
project.markdown(md)
File "/usr/lib/python2.7/site-packages/ford/fortran_project.py", line 136, in markdown
src.markdown(md)
File "/usr/lib/python2.7/site-packages/ford/sourceform.py", line 172, in markdown
if isinstance(item, FortranBase): item.markdown(md)
File "/usr/lib/python2.7/site-packages/ford/sourceform.py", line 172, in markdown
if isinstance(item, FortranBase): item.markdown(md)
File "/usr/lib/python2.7/site-packages/ford/sourceform.py", line 137, in markdown
self.doc = md.convert(self.doc)
File "/usr/lib/python2.7/site-packages/markdown/__init__.py", line 349, in convert
newRoot = treeprocessor.run(root)
File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", line 173, in run
if header_rgx.match(c.tag):
TypeError: expected string or buffer
- Finally I have tried to load the extension check-list that I have correctly installed. This is the log error I have obtained:
|stefano@zaghi|0|02:05 PM Fri Jan 23|
|~/fortran/IR_Precision|6 files, 232Kb|
|->ford doc/main_page.md
Traceback (most recent call last):
File "/usr/bin/ford", line 9, in <module>
load_entry_point('FORD==1.1.0', 'console_scripts', 'ford')()
File "/usr/lib/python2.7/site-packages/ford/__init__.py", line 79, in main
extension_configs={'markdown_include.include': {'base_path': md_base}})
File "/usr/lib/python2.7/site-packages/markdown/__init__.py", line 154, in __init__
configs=kwargs.get('extension_configs', {}))
File "/usr/lib/python2.7/site-packages/markdown/__init__.py", line 180, in registerExtensions
ext = self.build_extension(ext, configs.get(ext, {}))
File "/usr/lib/python2.7/site-packages/markdown/__init__.py", line 265, in build_extension
return module.makeExtension(**configs)
File "/usr/lib/python2.7/site-packages/markdown_checklist/extension.py", line 9, in makeExtension
return ChecklistExtension(configs=configs)
File "/usr/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 36, in __init__
self.setConfigs(kwargs.pop('configs', {}))
File "/usr/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs
for key, value in items:
TypeError: 'NoneType' object is not iterable
Do you have any suggestions?
See you soon.
from ford.
I have the same problems with both extensions. However, for the checklist extension, the problem would seem to lie Markdown and the extensions themselves, rather than FORD. When I use Markdown from the command line, I get
┌─chris@hex (fordtest) ~/Code/ford
└─╼ $ python -m markdown -x markdown_checklist.extension example-project-file.md
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/chris/Code/fordtest/lib/python2.7/site-packages/markdown/__main__.py", line 111, in <module>
run()
File "/home/chris/Code/fordtest/lib/python2.7/site-packages/markdown/__main__.py", line 105, in run
markdown.markdownFromFile(**options)
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/__init__.py", line 496, in markdownFromFile
md = Markdown(**kwargs)
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/__init__.py", line 154, in __init__
configs=kwargs.get('extension_configs', {}))
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/__init__.py", line 180, in registerExtensions
ext = self.build_extension(ext, configs.get(ext, {}))
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/__init__.py", line 265, in build_extension
return module.makeExtension(**configs)
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown_checklist/extension.py", line 9, in makeExtension
return ChecklistExtension(configs=configs)
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 36, in __init__
self.setConfigs(kwargs.pop('configs', {}))
File "/home/chris/Code/fordtest/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs
for key, value in items:
TypeError: 'NoneType' object is not iterable
This is with Markdown v2.5.2. When I go back to version 2.3.1 the checklist extension works fine from the command-line, although still not from within FORD for some reason. From what I can tell this is all related to the API for registering extensions and their configurations with Markdown. It has been altered between v2.3 and v2.5. While the change-log would imply that these alterations are supposed to be backwards compatible, evidently they are not.
Anyway, long story short, this will take some more digging on my part.
from ford.
Thank Chris,
I use checklist extension in MaTiSSe... I have to check too!
Thanks for the advice on API change... I completely miss this.
from ford.
I've submitted a bug-report to the checklist plugin repository. Hopefully it will get fixed at some point. I've also realized some similar bugs exist in my markdown-include extension and have fixed them.
from ford.
Happy to knowt it. I will stay connected.
See you soon.
from ford.
The latest version of the checklist plugin fixes these issues. As for markdown.extensions.toc, I have no idea why it's being troublesome. It's not my intention to deal with it at this time.
from ford.
Great! I'll try it immediately. Don't worry about toc
it was just a remark for Ford documentation.
Thank you again.
from ford.
The checklist works perfectly!
Thank you.
from ford.
Related Issues (20)
- Derived-types declared in submodules are missing HOT 6
- Parser failure in associate block with []-arrays
- Division by zero exception in lines_description of sourceform.py HOT 4
- Some attributes are missing from derived types
- Option coloured_edges is broken HOT 1
- Can't link from a page to source code HOT 3
- Bug in logic to skip big or incomplete graphs HOT 1
- Graphs with long edge labels become degenerated HOT 5
- show_proc_parent is ignored HOT 2
- Create FAQ
- Feature request: Option to turn off certain homepage components HOT 1
- Idea: "Source File" link to GitHub
- Update to fontawesome v6 HOT 2
- Fortran keywords are highlighed in a regular preformatted code block HOT 3
- Links are case sensitive HOT 2
- Issue with the BLOCK Statement HOT 1
- Markdown line breaks not working in lists HOT 2
- Documentation generation on my local machine and on github gives different outcomes HOT 6
- Path.resolve can not resolve urls
- Absurdly tall graphs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ford.