yiisoft-contrib / yiiframework.com

Source code for official Yii website
http://yiiframework.com/
Other
261 stars 100 forks source link

Need support markdown code with specified language on site #350

Open mubat opened 6 years ago

mubat commented 6 years ago

Markdown code block with specified language rendered with errors. Code looks like:

```php 
public function behaviors() {

  $behaviors = parent::behaviors();
  return $behaviors;
}

public function getSavedImage() {
  return $this->hasOne(Image::class, ['id' => 'image_id']);
} 
\```

but it rendered like: screenshot from 2018-05-15 14-15-15

Parser couldn't recognize ```php syntax

cebe commented 6 years ago

can you show on which page this is happening?

mubat commented 6 years ago

@cebe please see https://www.yiiframework.com/extension/mubat/yii2-inherit-model-behavior

cebe commented 6 years ago

thanks for reporting.

seems this can be solved by updating the markdown library to 1.2.0 as it renders fine there, however the LaTeX component of it requires 1.0.

related to https://github.com/cebe/markdown-latex/issues/12

execut commented 5 years ago

Also not work short syntax of code block in single line: code here