-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Markdown tables not working #94
Comments
I am now running the git version - same problem. Digging deeper, here's what I've found.
The following proof-of-concept allows Markdown tables to work:
However it might be better, rather than forcing people to edit config/aspects.rb directly, to have some way of setting renderer options in config.yml Aside: it looks like Redcarpet only supports PHP-style pipe tables, not the other table formats supported by e.g. pandoc. Aside 2: Tilt doesn't appear to handle the :escape_html option when using Redcarpet. |
Content preview: Maybe we should enable some options by default or by using Content analysis details: (-2.9 points, 5.0 required) pts rule name description 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. Maybe we should enable some options by default or by using the *.yml
|
I was seeking your steer as how you'd like to have this done. One way is to change config/aspects.rb to do the lookup each time:
But that's a lot of repetition. Perhaps it would be better to read the global yml render options in plugins/filters/tilt.rb, and merge in any options passed to the filter.
From the Tilt (1.4.1) code:
So, the options argument has
So by this stage, it's turned back into a normal hash, and Olelo has converted symbol keys to strings :-( |
And the other thing is what to do about WithIndifferentAccess. Rather than getting Tilt to change, perhaps we can set a singleton to_hash method which just passes through the object unchanged. |
Overriding to_hash doesn't work. redcarpet is written in C and directly looks for hash keys which are symbols, rather than going via a :[] method dispatch.
Incidentally, I found what I think is a bit of an inconsistency: Olelo::Config#to_hash returns a WithIndifferentAccess object, but WithIndifferentAccess#to_hash returns a regular Hash. |
Content preview: I think we should do that. On 2013-08-31 11:30, Brian Candler Content analysis details: (-2.9 points, 5.0 required) pts rule name description 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. I think we should do that. On 2013-08-31 11:30, Brian Candler wrote:
|
Content preview: The solution with less repetition is definitely better. We Content analysis details: (-2.9 points, 5.0 required) pts rule name description 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. The solution with less repetition is definitely better. We should also On 2013-08-31 10:52, Brian Candler wrote:
|
Content preview: Ok, so at first we should fix the inconsistency and then we Content analysis details: (-2.9 points, 5.0 required) pts rule name description 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. Ok, so at first we should fix the inconsistency and then we cannot On 2013-08-31 21:33, Brian Candler wrote:
|
Suggested fix: Note, I have not changed Olelo::Config#to_hash (i.e. it still returns WithIndifferentAccess) as I don't know what depends on this. |
If I create a Markdown page containing a table, it doesn't render properly.
It looks like an option needs to be passed to Tilt and/or Redcarpet to enable the table extension (aside: there are other Markdown extensions I'd like to turn on). However I can't see how to do this in config.yml or elsewhere.
The text was updated successfully, but these errors were encountered: